Created
September 25, 2017 13:37
-
-
Save mp911de/44ef067a465b9eb4ce0c19edb3760bc9 to your computer and use it in GitHub Desktop.
Accessing CommandHandler buffers in Lettuce 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RedisClient redisClient = RedisClient.create(RedisURI.Builder.redis("localhost", 6379).build()); | |
StatefulRedisConnection<String, String> redis = redisClient.connect(); | |
RedisChannelHandler<String, String> channelHandler = (RedisChannelHandler) redis; | |
CommandHandler<String, String> commandHandler = (CommandHandler) channelHandler.getChannelWriter(); | |
Collection<RedisCommand<String, String, ?>> disconnectedBuffer = null; // reflective access to commandHandler.disconnectedBuffer | |
Collection<RedisCommand<String, String, ?>> commandBuffer = null; // reflective access to commandHandler.commandBuffer | |
RedisClusterClient clusterClient = RedisClusterClient.create(RedisURI.Builder.redis("localhost", 6379).build()); | |
StatefulRedisClusterConnection<String, String> cluster = clusterClient.connect(); | |
StatefulRedisConnection<String, String> host = cluster.getConnection("host", 6379); | |
// from here, see above |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment