Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public class GivenConfigs {
@Getter @Setter
private static CoreDBOperator mainDatabase;

@Getter @Setter
private static RedisClient redisClient;

public static void init() {
setMainConfig(new MainConfigHandler());
setMainMessages(new MainMessagesHandler());
Expand All @@ -53,12 +50,6 @@ public static void init() {
} catch (Exception e) {
e.printStackTrace();
}

try {
setRedisClient(new RedisClient());
} catch (Exception e) {
e.printStackTrace();
}
}

public static void ensureFolders() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ public static void withJedis(Consumer<Jedis> consumer, boolean silent) {
});
}

public static RedisClient getInstance() {
return GivenConfigs.getRedisClient();
}

public static void sendMessage(RedisMessage message) {
withJedis(j -> j.publish(message.getChannel(), message.getMessage()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import singularity.utils.MessageUtils;

@Getter @Setter
public abstract class RedisListener extends JedisPubSub implements Identifiable {
public class RedisListener extends JedisPubSub implements Identifiable {
private String identifier;

public RedisListener(String identifier) {
Expand Down Expand Up @@ -39,5 +39,7 @@ public void registerAndLoad() {
load();
}

abstract String[] getChannelsArray();
public String[] getChannelsArray() {
return new String[] {};
}
}