We now support UNLINK for both Jedis & Lettuce throughout the single node and cluster connection. Reactive support is only available for Lettuce.
Original pull request: #294.
We now support Redis connections using OS-native transports through unix domain sockets when using the Lettuce driver. Domain sockets do not require a roundtrip through the networking layer but directly use native epoll or kqueue interfaces.
LettuceConnectionFactory factory = new LettuceConnectionFactory(new RedisSocketConfiguration("/var/run/redis.sock"));
Unix domain socket support requires netty's native epoll/kqueue dependencies matching the runtime environment:
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
<version>${netty}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<classifier>osx-x86_64</classifier>
<version>${netty}</version>
</dependency>
Original Pull Request: #286
We now reuse the initially created map and add or replace initial configurations in place instead of creating each time a new map.
Original pull request: #293.
Adapt Lettuce implementation to use async commands in transaction mode. Adapt tests to changed behavior of returning status responses. Extend Javadoc.
Original pull request: #284.
We now reuse a shared Lettuce connection across our reactive connection wrappers if LettuceConnectionFactory is configured to provide a shared connection instance. Reactive connections can either operate with a shared connection or with a connection provider only.
We also now execute blocking Redis commands (BLPOP, BRPOP, BRPOPLPUSH) on dedicated connection.
Original Pull Request: #290
We now use the asynchronous API to dispatch commands within a transaction using the Lettuce driver. This allows us dropping our additional result wrappers and use a single, uniform api for deferred results.
Original pull request: #289.
Fix generics for accepted Future, Supplier and Converter. Introduce generics for status responses. Add Javadoc, use synchronous API for exists call.
Original pull request: #289.
We now encapsulate deferred results for pipelining and transactions entirely within FutureResult and its subtypes. FutureResult accepts a Supplier<T> for default values, if operations return null and reports whether its result requires conversion. JedisResult and LettuceResult are now top-level classes and no longer inner classes of their connection factories.
Original pull request: #289.
Provide a String-focused convenience class for simpler bootstrapping and to provide a dedicated bean type for the application context when using auto-configuration.
Original Pull Request: #288
We now allow configuration of the client name that is applied to connections using the Lettuce driver.
LettuceClientConfiguration configuration = LettuceClientConfiguration.builder().clientName("foo-bar").build();
LettuceConnectionFactory factory = new LettuceConnectionFactory(new RedisStandaloneConfiguration(), configuration);
Fixed some typos, javadoc and method visibility along the way.
Original Pull Request: #285
Add dedicated section on executing lua scripts via the reactive infrastructure, rephrase some other parts adapt non-Javadoc comments to code style.
Original Pull Request: #280
Remove leftovers from SRP and JRedis removal. Reference bundled Spring Framework version in documentation links. Update outdated links. Upgrade to Java 8 requirements. Order operations interfaces alphabetically (documentation, code) and update what's new section.
Original Pull Request: #280
Accept varargs byte arrays instead of Collection of byte arrays. Bypass own routing for exists single-slot execution in Redis Cluster. Replace parallel stream execution of exists(…) with sequential ClusterCommandExecutor dispatch.
Reorder methods in ClusterConnectionTests by name. Adapt Javadoc.
Original pull request: #281.
Strengthen non-null requirements when obtaining the native connection from LettuceReactiveRedisConnection. Guard close against multiple calls and use concatMap instead of flatMap to retain publisher sequence.
Original Pull Request: #282
We now emit array responses from Lua script execution as complete List instead of emitting the individual elements through the Publisher.
Lua scripts may return nil (null) elements that would be not emitted through a Publisher. Skipping null values would garble up the response – and in several cases, the response array is required as List. Emitting the whole List aligns the response to the signatures imposed by generics and aligns the behavior with the imperative API.
Original Pull Request: #282
Eagerly initialize known commands. Preallocate Jedis response builder. Replace list concatenation with array copy. Reject null arguments in execute(). Remove inversion through collections with direct byte array creation. Reorder arguments in signatures, visibility modifiers, Javadoc.
Original pull request: #283.
We now support HSTRLEN command throug RedisHashCommands for Lettuce and Jedis in both an imperative and reactive manner.
However, Jedis not natively supporting HSTRLEN via its API we’ve come up with some more reflective invocation allowing to execute commands currently not known by Jedis. We also added this behavior to the cluster implementation which as of now also supports RedisClusterConnection#execute.
Original pull request: #283.
Change return type for mset from void to Boolean. Add missing Nullable annotations. Add Javadoc.
Disable flakey tests for now.
Related pull request: #279.
We now use a fallback exception translation strategy in JedisClusterConnection to map all non-mapped exceptions to RedisSystemException. This change prevents null pointer exceptions caused by potentially throwing null.
Original Pull Request: #275
Add NonNullFields to packages. Add missing Nullable annotations. Extend Javadoc. Replace simple equals/hashCode methods using Lomboks EqualsAndHashCode annotation. Use RequiredArgsConstructor for private classes in favor of own constructors. Replace null-checks with qualified access whether objects are empty/applicable. Rearrange methods according to interface ordering.
Remove demo code from KeyspaceConfiguration.
Original pull request: #277.
Mark all packages with Spring Frameworks @NonNullApi. Add Spring's @Nullable to methods, parameters and fields that take or produce null values. Adapted using code to make sure the IDE can evaluate the null flow properly. Fix Javadoc in places where an invalid null handling policy was advertised. Strengthened null requirements for types that expose null-instances.
Resolve some of the inherited null invariants, align Converters to null contract.
Original pull request: #277.
Remove final keywords from variables in ClusterCommandExecutor. Reduce constructor visibility of driver-specific commands classes. Fix Javadoc.
Original Pull Request: #267
We removed the geo prefix from the imperative and reactive GeoOperations interfaces and our methods to match a more expressive scheme:
geoAdd(…) -> add(…)
geoDist(…) -> distance(…)
geoHash(…) -> hash(…)
geoPos(…) -> position(…)
geoRadius(…) -> radius(…)
geoRadiusByMember(…) -> radius(…)
geoRemove(…) -> remove(…)
Methods on the imperative API remain as deprecated default methods to retain compatibility and not enforce changes in the client code.
Original Pull Request: #274
We now release Jedis cluster node connections with Jedis.close() to the pool instead of Pool.returnResource(…). The close() method itself checks whether the connection was broken and if so, the connection gets destroyed. Destroying broken connections prevents the pool from supplying broken connections on borrow when testOnBorrow is disabled.
The only case where we return broken resources ourselves to the Pool is when we discover a broken connection ourselves: If we run into a NullPointerException or RedisConnectionFailureException, then we consider a connection is broken.
Original Pull Request: #271
Remove builder interfaces and aim for classes instead.
Also use delegation for builders avoiding constructors with too many arguments.
Alter ConnectionProvider#getConnection(Class) to return a typed connection as this is is the expected return type given the input parameters used.
Remove LettuceConnectionProvider.getConnection() method as it makes no longer sense for the non-lambda enabled interface. Remove unnecessary casts.
Add connection factory to cleanup-tracker on test class instantiation instead within the parameter supplier method to prevent shutdown by other cleanup calls that may happen in between. Reuse client resources.
Original Pull Request: #262
We now support Lettuce connection pooling by configuring a specialized client configuration via LettucePoolingClientConfiguration.builder(). Pooling settings can be configured through the builder and used with LettuceConnectionFactory.
Connection pooling is supported with Standalone and Sentinel-managed connections.
LettucePoolingClientConfiguration.builder()
.poolConfig(poolConfig)
.and() // allows configuration of further settings.
Original Pull Request: #262