Redisson
Redisson - distributed Java objects and services (Set, Multimap, SortedSet, Map, List, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, AtomicLong, Map Reduce, Publish / Subscribe, Bloom filter, Spring Cache, Executor service, Tomcat Session Manager, Scheduler service, JCache API) on top of Redis server.
State of the Art Redis client
Quick Start
jar 引入
<dependencies>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>3.7.0</version>
</dependency>
</dependencies>
Hello World
public static void main(String[] args) throws IOException {
RedissonClient redisson = Redisson.create();
RBucket<String> bucket = redisson.getBucket("anyObject");
bucket.set("hello");
String obj = bucket.get();
System.out.println(obj);
}