Package cc.carm.plugin.mineredis
Class MineRedis
- java.lang.Object
-
- cc.carm.plugin.mineredis.MineRedis
-
public class MineRedis extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MineRedis()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.lettuce.core.api.async.RedisAsyncCommands<java.lang.String,java.lang.String>
async()
准备以异步方式操作RedisCommands。static @NotNull RedisManager
create(@NotNull io.lettuce.core.RedisURI url)
static @NotNull RedisManager
create(@NotNull io.lettuce.core.RedisURI url, @NotNull io.lettuce.core.ClientOptions options)
static @NotNull RedisManager
create(@NotNull io.lettuce.core.RedisURI url, @NotNull io.lettuce.core.resource.ClientResources resources, @NotNull io.lettuce.core.ClientOptions options)
static @NotNull java.util.logging.Logger
getLogger()
static @NotNull RedisManager
getManager()
static @NotNull java.lang.String
getServerID()
protected static void
initializeAPI(IMineRedis api)
static long
publish(@NotNull java.lang.String channel, @NotNull com.google.common.io.ByteArrayDataOutput byteOutput)
static long
publish(@NotNull java.lang.String channel, @NotNull java.lang.Object... values)
static long
publish(@NotNull java.lang.String channel, @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> byteOutput)
static io.lettuce.core.RedisFuture<java.lang.Long>
publishAsync(@NotNull java.lang.String channel, @NotNull com.google.common.io.ByteArrayDataOutput byteOutput)
static io.lettuce.core.RedisFuture<java.lang.Long>
publishAsync(@NotNull java.lang.String channel, @NotNull java.lang.Object... values)
static io.lettuce.core.RedisFuture<java.lang.Long>
publishAsync(@NotNull java.lang.String channel, @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> byteOutput)
static void
registerChannel(@NotNull RedisChannel channel)
static void
registerChannelListener(@NotNull RedisMessageListener listener, @NotNull java.lang.String channel, @NotNull java.lang.String... moreChannels)
static void
registerChannels(@NotNull java.lang.Class<?> channelClazz)
static void
registerGlobalListener(@NotNull RedisMessageListener listener, @NotNull RedisMessageListener... moreListeners)
static void
registerPatternListener(@NotNull RedisMessageListener listener, @NotNull java.lang.String channelPattern, @NotNull java.lang.String... morePatterns)
static RedisRequestBuilder
request(@NotNull java.lang.String channel, @NotNull com.google.common.io.ByteArrayDataOutput byteOutput)
static RedisRequestBuilder
request(@NotNull java.lang.String channel, @NotNull java.lang.Object... values)
static RedisRequestBuilder
request(@NotNull java.lang.String channel, @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> byteOutput)
static void
shutdown(RedisManager manager)
终止并关闭一个 RedisManager 实例。static void
subscribe(@NotNull java.lang.String channel, @NotNull java.lang.String... moreChannels)
static void
subscribePattern(@NotNull java.lang.String channelPattern, @NotNull java.lang.String... morePatterns)
static void
supplyServerID(@Nullable java.util.function.Supplier<java.lang.String> idProvider)
static io.lettuce.core.api.sync.RedisCommands<java.lang.String,java.lang.String>
sync()
准备以同步方式操作RedisCommands。static void
unregisterChannels(@NotNull java.lang.Class<?> channelClazz)
static void
unregisterListener(@NotNull RedisMessageListener listener)
static void
unsubscribe(@NotNull java.lang.String channel, @NotNull java.lang.String... moreChannels)
static void
unsubscribePattern(@NotNull java.lang.String channelPattern, @NotNull java.lang.String... morePatterns)
-
-
-
Method Detail
-
initializeAPI
protected static void initializeAPI(IMineRedis api)
-
getLogger
@NotNull public static @NotNull java.util.logging.Logger getLogger()
-
getServerID
@NotNull public static @NotNull java.lang.String getServerID()
-
supplyServerID
public static void supplyServerID(@Nullable @Nullable java.util.function.Supplier<java.lang.String> idProvider)
-
getManager
@NotNull public static @NotNull RedisManager getManager()
-
create
@NotNull public static @NotNull RedisManager create(@NotNull @NotNull io.lettuce.core.RedisURI url, @NotNull @NotNull io.lettuce.core.resource.ClientResources resources, @NotNull @NotNull io.lettuce.core.ClientOptions options)
-
create
@NotNull public static @NotNull RedisManager create(@NotNull @NotNull io.lettuce.core.RedisURI url, @NotNull @NotNull io.lettuce.core.ClientOptions options)
-
create
@NotNull public static @NotNull RedisManager create(@NotNull @NotNull io.lettuce.core.RedisURI url)
-
shutdown
public static void shutdown(RedisManager manager)
终止并关闭一个 RedisManager 实例。- Parameters:
manager
- RedisManager实例
-
sync
public static io.lettuce.core.api.sync.RedisCommands<java.lang.String,java.lang.String> sync()
准备以同步方式操作RedisCommands。- Returns:
RedisCommands
-
async
public static io.lettuce.core.api.async.RedisAsyncCommands<java.lang.String,java.lang.String> async()
准备以异步方式操作RedisCommands。- Returns:
RedisAsyncCommands
-
subscribe
public static void subscribe(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.String... moreChannels)
-
unsubscribe
public static void unsubscribe(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.String... moreChannels)
-
subscribePattern
public static void subscribePattern(@NotNull @NotNull java.lang.String channelPattern, @NotNull @NotNull java.lang.String... morePatterns)
-
unsubscribePattern
public static void unsubscribePattern(@NotNull @NotNull java.lang.String channelPattern, @NotNull @NotNull java.lang.String... morePatterns)
-
publish
public static long publish(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull com.google.common.io.ByteArrayDataOutput byteOutput)
-
publish
public static long publish(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> byteOutput)
-
publish
public static long publish(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.Object... values)
-
publishAsync
public static io.lettuce.core.RedisFuture<java.lang.Long> publishAsync(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull com.google.common.io.ByteArrayDataOutput byteOutput)
-
publishAsync
public static io.lettuce.core.RedisFuture<java.lang.Long> publishAsync(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> byteOutput)
-
publishAsync
public static io.lettuce.core.RedisFuture<java.lang.Long> publishAsync(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.Object... values)
-
request
public static RedisRequestBuilder request(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull com.google.common.io.ByteArrayDataOutput byteOutput)
-
request
public static RedisRequestBuilder request(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.util.function.Consumer<com.google.common.io.ByteArrayDataOutput> byteOutput)
-
request
public static RedisRequestBuilder request(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.Object... values)
-
registerGlobalListener
public static void registerGlobalListener(@NotNull @NotNull RedisMessageListener listener, @NotNull @NotNull RedisMessageListener... moreListeners)
-
registerChannelListener
public static void registerChannelListener(@NotNull @NotNull RedisMessageListener listener, @NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.String... moreChannels)
-
registerPatternListener
public static void registerPatternListener(@NotNull @NotNull RedisMessageListener listener, @NotNull @NotNull java.lang.String channelPattern, @NotNull @NotNull java.lang.String... morePatterns)
-
registerChannels
public static void registerChannels(@NotNull @NotNull java.lang.Class<?> channelClazz)
-
unregisterChannels
public static void unregisterChannels(@NotNull @NotNull java.lang.Class<?> channelClazz)
-
registerChannel
public static void registerChannel(@NotNull @NotNull RedisChannel channel)
-
unregisterListener
public static void unregisterListener(@NotNull @NotNull RedisMessageListener listener)
-
-