-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- optimize connection utilization - fix missing digest method when using the lower version of the lettuce client.
- Loading branch information
Showing
30 changed files
with
259 additions
and
152 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
31 changes: 31 additions & 0 deletions
31
cosky-core/src/main/java/me/ahoo/cosky/core/redis/RedisConnection.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package me.ahoo.cosky.core.redis; | ||
|
||
import io.lettuce.core.api.StatefulConnection; | ||
import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands; | ||
|
||
|
||
/** | ||
* @author ahoo wang | ||
*/ | ||
public class RedisConnection implements AutoCloseable { | ||
private StatefulConnection<String, String> connection; | ||
private RedisClusterAsyncCommands<String, String> asyncCommands; | ||
|
||
public RedisConnection(StatefulConnection<String, String> connection, RedisClusterAsyncCommands<String, String> asyncCommands) { | ||
this.connection = connection; | ||
this.asyncCommands = asyncCommands; | ||
} | ||
|
||
public StatefulConnection<String, String> getConnection() { | ||
return connection; | ||
} | ||
|
||
public RedisClusterAsyncCommands<String, String> getAsyncCommands() { | ||
return asyncCommands; | ||
} | ||
|
||
@Override | ||
public void close() throws Exception { | ||
connection.close(); | ||
} | ||
} |
Oops, something went wrong.