Class RedisChannel
- java.lang.Object
-
- cc.carm.plugin.mineredis.api.channel.RedisChannel
-
- All Implemented Interfaces:
RedisMessageListener
public class RedisChannel extends java.lang.Object implements RedisMessageListener
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull java.lang.String
channel
protected @Nullable java.util.function.Predicate<RedisMessage>
filter
protected @Nullable java.util.function.Function<RedisMessage,PreparedRedisMessage>
handler
-
Constructor Summary
Constructors Constructor Description RedisChannel(@NotNull java.lang.String channel, @Nullable java.util.function.Predicate<RedisMessage> filter, @Nullable java.util.function.Function<RedisMessage,PreparedRedisMessage> handler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RedisChannelBuilder
builder(java.lang.String channel)
static RedisChannelBuilder
builder(java.lang.String... channelParts)
@NotNull java.lang.String
getChannel()
void
handle(RedisMessage message)
static RedisChannel
of(@NotNull java.lang.String channel)
static RedisChannel
of(@NotNull java.lang.String... channelPart)
static RedisChannel
of(@NotNull java.lang.String channel, @NotNull java.util.function.Consumer<RedisMessage> handler)
static RedisChannel
of(@NotNull java.lang.String channel, @NotNull java.util.function.Function<RedisMessage,PreparedRedisMessage> handler)
static RedisChannel
of(@NotNull java.lang.String channel, @NotNull java.util.function.Predicate<RedisMessage> predicate, @NotNull java.util.function.Function<RedisMessage,PreparedRedisMessage> handler)
long
publish(@NotNull com.google.common.io.ByteArrayDataOutput data)
long
publish(@NotNull java.lang.Object... values)
long
publish(@NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> data)
io.lettuce.core.RedisFuture<java.lang.Long>
publishAsync(@NotNull com.google.common.io.ByteArrayDataOutput data)
io.lettuce.core.RedisFuture<java.lang.Long>
publishAsync(@NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> data)
io.lettuce.core.RedisFuture<java.lang.Long>
publishAsync(java.lang.Object... values)
boolean
shouldRegister()
-
-
-
Field Detail
-
channel
@NotNull protected final @NotNull java.lang.String channel
-
filter
@Nullable protected final @Nullable java.util.function.Predicate<RedisMessage> filter
-
handler
@Nullable protected final @Nullable java.util.function.Function<RedisMessage,PreparedRedisMessage> handler
-
-
Constructor Detail
-
RedisChannel
public RedisChannel(@NotNull @NotNull java.lang.String channel, @Nullable @Nullable java.util.function.Predicate<RedisMessage> filter, @Nullable @Nullable java.util.function.Function<RedisMessage,PreparedRedisMessage> handler)
-
-
Method Detail
-
of
public static RedisChannel of(@NotNull @NotNull java.lang.String channel)
-
of
public static RedisChannel of(@NotNull @NotNull java.lang.String... channelPart)
-
of
public static RedisChannel of(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.util.function.Consumer<RedisMessage> handler)
-
of
public static RedisChannel of(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.util.function.Function<RedisMessage,PreparedRedisMessage> handler)
-
of
public static RedisChannel of(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.util.function.Predicate<RedisMessage> predicate, @NotNull @NotNull java.util.function.Function<RedisMessage,PreparedRedisMessage> handler)
-
builder
public static RedisChannelBuilder builder(java.lang.String channel)
-
builder
public static RedisChannelBuilder builder(java.lang.String... channelParts)
-
getChannel
@NotNull public @NotNull java.lang.String getChannel()
-
shouldRegister
public boolean shouldRegister()
-
handle
public void handle(RedisMessage message)
- Specified by:
handle
in interfaceRedisMessageListener
-
publishAsync
public io.lettuce.core.RedisFuture<java.lang.Long> publishAsync(@NotNull @NotNull com.google.common.io.ByteArrayDataOutput data)
-
publishAsync
public io.lettuce.core.RedisFuture<java.lang.Long> publishAsync(@NotNull @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> data)
-
publishAsync
public io.lettuce.core.RedisFuture<java.lang.Long> publishAsync(java.lang.Object... values)
-
publish
public long publish(@NotNull @NotNull java.lang.Object... values)
-
publish
public long publish(@NotNull @NotNull com.google.common.io.ByteArrayDataOutput data)
-
publish
public long publish(@NotNull @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> data)
-
-