We now make sure to leave existing indexes untouched when using PartialUpdate.
We also fixed a glitch, where index values have not been removed correctly when saving entities with null values, along the way.
Original pull request: #207.
LettuceConnectionFactory and DefaultLettucePool now use the configured password to authenticate with Redis. Authentication is applied when connecting to nodes that were obtained from Redis Sentinel.
Original Pull Request: #204
Extend date range in license header. Retrieve connection and config for possible reconfiguration only if keyspaceNotificationsConfigParameter has a value.
Original pull request: #202.
We now allow setting the desired notify-keyspace-events server configuration via @EnableRedisRepsoitories. Use `null` or an empty String for not touching the server’s config. The default is `Ex`.
Original pull request: #202.
RedisTemplate executePipelined(RedisCallback) uses now the Hash Key and Hash Value serializers to deserialize the response.
Original pull request: #190.
CLA: 174020160421053943 (Anqing Shao).
Update reference documentation. Enhance JavaDoc. Remove destroy of managed bean. Refactor property update of writePartialUpdate into own method. Remove trailing whitespaces in JavaDoc.
Original pull request: #191.
We now allow partial update of domain types via PartialUpdate. The according expiration times and secondary index structures are updated accordingly.
In some cases it is not necessary to load and rewrite the entire entity just to set a new value within it. A session timestamp for last active time might be such a scenario where you just want to alter one property.
`PartialUpdate` allows to define `set`, `delete` actions on existing objects while taking care of updating potential expiration times of the entity itself as well as index structures.
.Sample Partial Update
====
[source,java]
----
PartialUpdate<Person> update = new PartialUpdate<Person>("e2c7dcee", Person.class)
.set("firstname", "mat") <1>
.set("address.city", "emond's field") <2>
.del("age"); <3>
template.update(update);
update = new PartialUpdate<Person>("e2c7dcee", Person.class)
.set("address", new Address("caemlyn", "andor")) <4>
.set("attributes", singletonMap("eye-color", "grey")); <5>
template.update(update);
update = new PartialUpdate<Person>("e2c7dcee", Person.class)
.refreshTtl(true); <6>
.set("expiration", 1000);
template.update(update);
----
<1> Set the simple property _firstname_ to _mat_
<2> Set the simple property _address.city_ to _emond's field_ without having to pass in the entire object. This does not work when a custom conversion is registered.
<3> Remove the property _age_.
<4> Set complex property _address_.
<5> Set a map/collection of values removes the previously existing map/collection and replaces the values with the given ones.
<6> Automatically update the server expiration time when altering time to live.
====
NOTE: Updating complex objects as well as map/collection structures requires further interaction with Redis to determine existing values which means that it might turn out that rewriting the entire entity might be faster.
Original pull request: #191.
Set EnableRedisRepositories.enableKeyspaceEvents default to OFF. Expiry notifications require to opt-in. Add JavaDoc. Add documentation for delayed/disabled event listener. Fix spelling. Use property value instead of attribute on RedisKeyValueAdapter bean definition. Remove trailing white spaces.
Original pull request: #193.
We now allow more fine grained setup for usage of Redis keyspace events. This can be done programmatically via the RedisKeyValueAdapter or using `@EnableRedisRepositories.enableKeyspaceEvents`.
Original pull request: #193.
RedisGeoCommands now take and return Spring Data domain types like Distance and GeoResults.
Updated JavaDoc and Reference documentation.
Added and updated author and license headers.
Fixed minor formatting and code style issues.
Original Pulll Request: #187
Return zero (0) in getAndSet to prevent NullPointerExceptions. Remove trailing whitespace. Add tests for existing methods. Simplify tests.
Original pull request: #182.
We now throw DataRetrievalFailureException in case of get() when the underlying key storing the value of an AtomicInteger, AtomicLong or AtomicDouble is removed from Redis.
Original pull request: #182.
Added FasterXML Jackson `ObjectMapper` based `HashMapper` implementation that allows flattening.
```java
class Person {
String firstname;
String lastname;
Address address;
}
class Address {
String city;
String country;
}
```
```bash
firstname:Jon
lastname:Snow
address:{ city : Castle Black, country : The North }
firstname:Jon
lastname:Snow
address.city:Castle Black
address.country:The North
```
Original pull request: #197.
Do not destroy RedisConnectionFactory which is likely managed outside of RedisKeyValueAdapter.
This change makes sure to retain a working connection factory while shutting down message listeners as those try to unsubscribe on shutdown.
Original Pull Request: #195
Rename ConvertingHashMapper to ObjectHashMapper. Add fromHash with type to avoid casting. Add JavaDoc documentation to HashMapper. Add hash mapping to reference documentation.
Original pull request: #194.
We now support mapping of simple and complex types to Redis HASH structures applying the same structure as the Repository support. This allows Object to hash Mapping and its direct usage via RedisTemplate without the need of explicitly having to use the repository abstraction.
Original pull request: #194.
We now pick up the ClassLoader from the ApplicationContext and use the latter as default in RedisTemplate for initializing the JdkSerializationRedisSerializer. We only do this in case the default serializer has not been set explicitly.
Original pull request: #192.
Add missing author tag. Minor reformatting. Explicitly set default SSL options and add test to verify default SSL options. Enhance JavaDoc.
Original pull request: #180.
LettuceConnectionFactory now supports verifyPeer and startTls options for Redis Standalone usage.
Original pull request: #180.
CLA: 166820160311101157 (Balázs Németh)
We now allow constructing JdkSerializationRedisSerializer using an own class loader and by specifying custom converters.
Using an own class-loader: new JdkSerializationRedisSerializer(classLoader)
Using own converters (Serializer/Deserializer): new JdkSerializationRedisSerializer(new SerializingConverter(), new DeserializingConverter(new DefaultDeserializer(classLoader)))
Original Pull Request: #179
Assert that not all values of a scan operation are captured by the first result and add tests to also run using the lettuce driver.
Original Pull Request: #178
Update jedis driver to 2.8.1. Use binary method for SSCAN and implement ZSCAN and HSCAN methods. Move ScanOptions to ScanParams conversion to JedisConverters.
Original Pull Request: #178
Add author and getter method for SSL property. Apply formatting. Create test to validate SSL setting is set correctly in the lettuce driver.
Original pull request: #177.