Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Fixed-RedisWrapper

A lightweight Jedis wrapper that simplifies Redis connections and adds server-to-server messaging through Pub/Sub channels. Messages are serialized with Gson, allowing each channel to work with typed Java objects.

What it demonstrates

  • Encapsulation of Redis clients and connection pools.
  • Server-to-server communication through Pub/Sub.
  • Generic serialization and deserialization with Gson.
  • A small API designed for Bukkit plugin integrations.

Technologies

Java 8 Maven Jedis Redis Gson Bukkit API

Basic usage

JedisBuilder jedis = JedisBuilder.builder()
    .setHost("localhost")
    .setPort(6379);

Redis redis = Redis.builder(plugin)
    .jedis(jedis)
    .build();

Channel<MyMessage> channel = redis.messenger()
    .getChannel("events", MyMessage.class);
channel.sendMessage(new MyMessage("hello"));

Listeners are registered with ChannelListener. The channel automatically converts objects to JSON when sending and reconstructs them when receiving.

Build

Requirements: Java 8 and Maven.

mvn clean package

The artifact is generated in target/. To use it in a Bukkit plugin, add the JAR and configure a Redis instance accessible by the participating servers.

Scope

This library focuses on Bukkit/Spigot and Redis integrations. It is not intended to replace a general-purpose Redis client or manage server infrastructure.

About

An easy bukkit jedis wrapper for creating the actual jedis instance and a Messenger to send messages to other servers

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages