|
|
Redisson: Redis based In-Memory Data Grid for Java.
|
|
|
====
|
|
|
[Quick start](https://github.com/redisson/redisson#quick-start) | [Documentation](https://github.com/redisson/redisson/wiki) | [Javadocs](http://www.javadoc.io/doc/org.redisson/redisson/3.5.7) | [Changelog](https://github.com/redisson/redisson/blob/master/CHANGELOG.md) | [Code examples](https://github.com/redisson/redisson-examples) | [Support chat](https://gitter.im/mrniko/redisson) | **[Redisson PRO](https://redisson.pro)**
|
|
|
|
|
|
Based on high-performance async and lock-free Java Redis client and [Netty](http://netty.io) framework.
|
|
|
|
|
|
| Stable <br/> Release Version | Release Date | JDK Version<br/> compatibility | `CompletionStage` <br/> support | `ProjectReactor` version<br/> compatibility |
|
|
|
| ------------- | ------------- | ------------| -----------| -----------|
|
|
|
| 3.6.1 | 15.02.2018 | 1.8, 1.9+ | Yes | 3.1.x |
|
|
|
| 2.11.1 | 15.02.2018 | 1.6, 1.7, 1.8, 1.9 and Android | No | 2.0.8 |
|
|
|
|
|
|
|
|
|
Features
|
|
|
================================
|
|
|
* Replicated servers mode (also supports [AWS ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Replication.html) and [Azure Redis Cache](https://azure.microsoft.com/en-us/services/cache/)):
|
|
|
1. automatic master server change discovery
|
|
|
* Cluster servers mode (also supports [AWS ElastiCache Cluster](http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.html) and [Azure Redis Cache](https://azure.microsoft.com/en-us/services/cache/)):
|
|
|
1. automatic master and slave servers discovery
|
|
|
2. automatic status and topology update
|
|
|
3. automatic slots change discovery
|
|
|
* Sentinel servers mode:
|
|
|
1. automatic master, slave and sentinel servers discovery
|
|
|
2. automatic status and topology update
|
|
|
* Master with Slave servers mode
|
|
|
* Single server mode
|
|
|
* Thread-safe implementation
|
|
|
* [Reactive Streams](https://github.com/redisson/redisson/wiki/3.-operations-execution#32-reactive-way) API
|
|
|
* [Asynchronous](https://github.com/redisson/redisson/wiki/3.-operations-execution#31-async-way) API
|
|
|
* Asynchronous connection pool
|
|
|
* Lua scripting
|
|
|
* [Distributed objects](https://github.com/redisson/redisson/wiki/6.-Distributed-objects)
|
|
|
Object holder, Binary stream holder, Geospatial holder, BitSet, AtomicLong, AtomicDouble, PublishSubscribe,
|
|
|
Bloom filter, HyperLogLog
|
|
|
* [Distributed collections](https://github.com/redisson/redisson/wiki/7.-Distributed-collections)
|
|
|
Map, Multimap, Set, List, SortedSet, ScoredSortedSet, LexSortedSet, Queue, Deque, Blocking Queue, Bounded Blocking Queue, Blocking Deque, Delayed Queue, Priority Queue, Priority Deque
|
|
|
* [Distributed locks and synchronizers](https://github.com/redisson/redisson/wiki/8.-Distributed-locks-and-synchronizers)
|
|
|
Lock, FairLock, MultiLock, RedLock, ReadWriteLock, Semaphore, PermitExpirableSemaphore, CountDownLatch
|
|
|
* [Distributed services](https://github.com/redisson/redisson/wiki/9.-distributed-services)
|
|
|
Remote service, Live Object service, Executor service, Scheduler service, MapReduce service
|
|
|
* [Spring Cache](https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks/#141-spring-cache) implementation
|
|
|
* [Hibernate Cache](https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks/#142-hibernate-cache) implementation
|
|
|
* [JCache API (JSR-107)](https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks/#143-jcache-api-jsr-107-implementation) implementation
|
|
|
* [Tomcat Session Manager](https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks#144-tomcat-redis-session-manager) implementation
|
|
|
* [Spring Session](https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks/#145-spring-session) implementation
|
|
|
* [Redis pipelining](https://github.com/redisson/redisson/wiki/10.-additional-features#102-execution-batches-of-commands) (command batches)
|
|
|
* Supports Android platform
|
|
|
* Supports auto-reconnection
|
|
|
* Supports failed to send command auto-retry
|
|
|
* Supports OSGi
|
|
|
* Supports SSL
|
|
|
* Supports many popular codecs ([Jackson JSON](https://github.com/FasterXML/jackson), [Avro](http://avro.apache.org/), [Smile](http://wiki.fasterxml.com/SmileFormatSpec), [CBOR](http://cbor.io/), [MsgPack](http://msgpack.org/), [Kryo](https://github.com/EsotericSoftware/kryo), [Amazon Ion](https://amzn.github.io/ion-docs/), [FST](https://github.com/RuedigerMoeller/fast-serialization), [LZ4](https://github.com/jpountz/lz4-java), [Snappy](https://github.com/xerial/snappy-java) and JDK Serialization)
|
|
|
* With over 1000 unit tests
|
|
|
|
|
|
Used by
|
|
|
================================
|
|
|
[](https://www.jeppesen.com/)
|
|
|
[](https://www.aig.com/)
|
|
|
[](https://www.adobe.com/)
|
|
|
[](https://www.spglobal.com/)
|
|
|
[](http://www.sap.com/)
|
|
|
[](http://ea.com/)
|
|
|
[](http://bnl.gov/)
|
|
|
|
|
|
[](http://newrelic.com/synthetics)
|
|
|
[](http://singtel.com/)
|
|
|
[](https://netflix.com/)
|
|
|
[](http://baidu.com/)
|
|
|
[](http://www.infor.com/)
|
|
|
[](https://www.crimsonhexagon.com/)
|
|
|
[](https://datorama.com/)
|
|
|
[](http://www.invaluable.com/)
|
|
|
[](http://www.ticketmaster.com/)
|
|
|
[](https://contaazul.com/)
|
|
|
|
|
|
[](https://www.nab.com.au/)
|
|
|
[](http://www.alibaba-inc.com)
|
|
|
[](https://www.flipkart.com/)
|
|
|
[](http://www.gdbbk.com/)
|
|
|
[](http://www.sulake.com/)
|
|
|
|
|
|
|
|
|
Success stories
|
|
|
================================
|
|
|
|
|
|
## [Moving from Hazelcast to Redis / Datorama](https://engineering.datorama.com/moving-from-hazelcast-to-redis-b90a0769d1cb)
|
|
|
## [Distributed Locking with Redis (Migration from Hazelcast) / ContaAzul](https://carlosbecker.com/posts/distributed-locks-redis/)
|
|
|
|
|
|
Quick start
|
|
|
===============================
|
|
|
|
|
|
#### Maven
|
|
|
<!-- JDK 1.8+ compatible -->
|
|
|
<dependency>
|
|
|
<groupId>org.redisson</groupId>
|
|
|
<artifactId>redisson</artifactId>
|
|
|
<version>3.6.1</version>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- JDK 1.6+ compatible -->
|
|
|
<dependency>
|
|
|
<groupId>org.redisson</groupId>
|
|
|
<artifactId>redisson</artifactId>
|
|
|
<version>2.11.1</version>
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
#### Gradle
|
|
|
// JDK 1.8+ compatible
|
|
|
compile 'org.redisson:redisson:3.6.1'
|
|
|
|
|
|
// JDK 1.6+ compatible
|
|
|
compile 'org.redisson:redisson:2.11.1'
|
|
|
|
|
|
#### Java
|
|
|
|
|
|
```java
|
|
|
// 1. Create config object
|
|
|
Config = ...
|
|
|
|
|
|
// 2. Create Redisson instance
|
|
|
RedissonClient redisson = Redisson.create(config);
|
|
|
|
|
|
// 3. Get object you need
|
|
|
RMap<MyKey, MyValue> map = redisson.getMap("myMap");
|
|
|
|
|
|
RLock lock = redisson.getLock("myLock");
|
|
|
|
|
|
RExecutorService executor = redisson.getExecutorService("myExecutorService");
|
|
|
|
|
|
// over 30 different objects and services ...
|
|
|
|
|
|
```
|
|
|
|
|
|
Downloads
|
|
|
===============================
|
|
|
|
|
|
[Redisson 3.6.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson&v=3.6.1&e=jar),
|
|
|
[Redisson node 3.6.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson-all&v=3.6.1&e=jar)
|
|
|
|
|
|
[Redisson 2.11.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson&v=2.11.1&e=jar),
|
|
|
[Redisson node 2.11.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson-all&v=2.11.1&e=jar)
|
|
|
|
|
|
### Supported by
|
|
|
|
|
|
YourKit is kindly supporting this open source project with its full-featured Java Profiler.
|
|
|
YourKit, LLC is the creator of innovative and intelligent tools for profiling
|
|
|
Java and .NET applications. Take a look at YourKit's leading software products:
|
|
|
<a href="http://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler</a> and
|
|
|
<a href="http://www.yourkit.com/.net/profiler/index.jsp">YourKit .NET Profiler</a>.
|