We now guard multi/exec blocks by checking the connection type. This allows to skip those commands when running in cluster.
Original pull request: #173.
We moved away from returning raw map types and now return dedicated objects for command executions in cluster environment. This allows to maintain node information and collecting results from each and every callback. MGET now returns values according to the key position.
Additionally we now prefix info commands in the cluster with the nodes host:port.
Original pull request: #174.
Add ClientResources to LettuceConnectionFactory. Add TestClientResources for managed resources during tests and reuse ClientResources as much as possible in tests.
Original Pull Request: #169
Several tests rely heavily on time to perform synchronization. Therfore we remove Thread.sleep from tests which do not require a sleep at all, use a condition where possible and increase timeouts on tests known to fail very likely due to a short Thread.sleep.
Original Pull Request: #171
Extend JavaDoc documentation. Spelling fixes. Add Expiration.from factory method to create Expiration from all available time units.
Original pull request: #170.
We now support EX/PX and NX/XX arguments along with the SET command for both xetorthio/jedis and mp911de/lettuce.
Jedis 2.8 does not support all combinations of EX/PX and NX/XX. To work around those limitations we delegate to the according set methods to execute related commands or fail fast if there is no way for delegation.
Original pull request: #170.
Increase the expiration time to prevent test from failing randomly when executed in cluster environment. Needs to be done as a cluster refresh on driver level might take longer than the actual expiration, which then causes the key to already be expired when checking the assertion.
Removed duplicate configuration options for timeout and password from RedisClusterConfiguration and use the ones provided via the RedisConnectionFactory.
Original pull request: #158.
Add new config property to configure a password for operations with Redis Cluster. The only driver to support Redis Cluster with password is lettuce but 3.4.Final has a blocker bug that prevents the usage
Original pull request: #158.
Update documentation and fix spelling in JavaDoc and reference documentation.
Allow node lookup by host/port and node Id to enable flexibility when passing references to Redis Cluster nodes. Parse multiple slot ranges for a cluster node and move CLUSTER NODES parser to Converters.
Use fixed line separator instead of OS-specific line separator, consolidate duplicate code, support clusterSetSlotStable with lettuce 3.4 and set lettuce driver shutdown timeout to zero for long running tests.
Original pull request: #158.
Cluster support is based on the very same building blocks as non clustered communication. RedisClusterConnection and extension to RedisConnection handles the communication with the Redis Cluster and translates errors into the Spring DAO exception hierarchy.
Redirects for to a specific keys to the corresponding slot serving node are handled by the driver libraries, higher level functions like collecting information accross nodes, or sending commands to all nodes in the cluster that are covered by RedisClusterConnection utilizing a ClusterCommandExecutor distributing commands accross the cluster and collecting results.
RedisTemplate provides access to cluster specific operations via the ClusterOperations interface that can be obtained via RedisTemplate.opsForCluster(). This allows to execute commands explicitly on a single node within the cluster while retaining de-/serialization features configured for the template.
Original pull request: #158.
As of Spring Framework 4.3.RC1, the `Cache` interface has a new `<T> T get(Object key, Callable<T> valueLoader);` method (see SPR-9254).
If no entry for the given key is found, the `Callable` is invoked to compute/load the value that is then put into redis and returned. Additionally concurrent calls get synchronized so that the `Callable` is only called once.
Using Spring Framework 4.3 failures result in `o.s.c.Cache$ValueRetrievalException` prior versions use `RedisSystemException`.
Original pull request: #162.
- Introduce Maven pom.xml.
- Moved Asciidoctor files to src/main/asciidoc.
- Moved notice.txt etc. to src/main/resources.
- Add logback.xml
- Update Makefile to use maven and pick build profiles.
- Update template.mf to pick up versions in pom.xml
- Add build matrix for spring versions to .travis.yml
- Use container based travis infrastructure.
- Update readme.
We now actively select the predefined db set via the dbIndex on LettuceConnectionFactory. Fixed some spelling issues along the way.
Original pull request: #157.
ScanCursor now retriggers SCAN command for results having a new cursorId but no actual values. This avoids NoSuchElementException for server calls like:
scan 0 match key*9
1) 1966080
2) (empty list or set)
Original Pull Request: #154
CLA Number: 143520151016081625 (Duobiao Ou)
Add failing tests for scanning key sets where Redis returns a scan iteration pointing to the next cursor but having no actual values itself like in:
scan 0 match key*9
1) 1966080
2) (empty list or set)