Commit Graph

1266 Commits

Author SHA1 Message Date
Christoph Strobl
d257ae1074 DATAREDIS-525 - Add support for ReactiveRedisConnection & ReactiveRedisClusterConnection.
We introduced reactor based reactive connection support via ReactiveRedisConnection and ReactiveRedisClusterConnection.

A reactive connection can be obtained via the ConnectionFactory. This is currently only possible when using the Lettuce Redis driver.

Original pull request: #229.
2016-11-17 20:10:03 +01:00
Christoph Strobl
f6411b3811 DATAREDIS-567 - Remove Support for SRP and JRedis. 2016-11-07 15:34:12 +01:00
Oliver Gierke
1713f6d5e4 DATAREDIS-557 - Updated changelog. 2016-11-03 18:56:49 +01:00
Mark Paluch
aa3c40780a DATAREDIS-528 - Polishing.
Extend date ranges in license headers. Add author tags. Update documentation.

Original pull request: #222.
2016-10-12 16:34:13 +02:00
Christoph Strobl
4be4ed0b28 DATAREDIS-528 - Upgrade to Lettuce 4.2.2.
We now support Lettuce 4.2.2.Final. Using Lettuce requires Java 8.

Original pull request: #222.
2016-10-12 15:45:38 +02:00
Mark Paluch
863e5b8d68 DATAREDIS-553 - Polishing.
Improve javadoc. Replace static method imports with qualified method calls. Refactor duplicate RedisCacheKey construction into own method. Fix formatting.

Original pull request: #221.
2016-10-12 15:07:13 +02:00
Mark Paluch
f26441d48d DATAREDIS-553 - Support caching null values via RedisCache using callable.
Store `NullValue` placeholders when null value caching is allowed. Remove cache values when null value caching is disabled and the value loader returns a `null` value.

Original pull request: #221.
2016-10-12 15:07:09 +02:00
Christoph Strobl
4c54bf972a DATAREDIS-553 - Support caching null values via RedisCache.
We now support caching `null` values in `RedisCache` by storing a dedicated `NullValue` reference as a placeholder. To enable this feature please set up `RedisCacheManager` accordingly and make sure the used `RedisSerializer` is capable of dealing the `NullValue` type.
Both the `JdkSerializationRedisSerializer` and the `GenericJackson2JsonRedisSerializer` support this out of the box.

Original pull request: #221.
2016-10-12 15:06:59 +02:00
Christoph Strobl
72d6df00c8 DATAREDIS-542 - Polishing.
Prevent putIfAbsent from prolonging expiration time of existing keys having same value.
Remove some trailing white spaces.

Original Pull Request: #224
2016-10-07 11:31:14 +02:00
Mark Paluch
ea598c2dad DATAREDIS-542 - Fix key expiration for RedisCache.putIfAbsent.
RedisCache now expires keys using putIfAbsent if the key was set. Previously, the key was only expired if the value was already present and the value matched the value stored inside of Redis.

Original Pull Request: #224
2016-10-07 11:30:50 +02:00
Oliver Gierke
382377df99 DATAREDIS-555 - Updated changelog. 2016-09-29 14:42:12 +02:00
Oliver Gierke
f983e42253 DATAREDIS-556 - Updated changelog. 2016-09-29 11:42:11 +02:00
Oliver Gierke
2107b16507 DATAREDIS-554 - Updated changelog. 2016-09-21 08:09:10 +02:00
Oliver Gierke
3c6dc69535 DATAREDIS-522 - Updated changelog. 2016-09-21 08:09:06 +02:00
Mark Paluch
4c8f1674e4 DATAREDIS-533 - Polishing.
Remove empty lines after last inner class. Extract duplicate code in variable. Fix spelling. Update Reference Documentation. Remove merge leftovers.

Original pull request: #215.
2016-09-13 15:43:28 +02:00
Christoph Strobl
07d0b82100 DATAREDIS-533 - Add support for geo indexes.
We now allow usage of @GeoIndexed to mark GeoLocation or Point properties as candidates for secondary index creation. Non null values will be included in GEOADD command as follows:

    GEOADD keyspace:property-path point.x point.y entity-id

@GeoIndexed can be used on top level as well as on nested properties.

class Person {

	@Id String id;
	String firstname, lastname;
	Address hometown;
}

class Address {
	String city, street, housenumber;
	@GeoIndexed Point location;
}

The above allows us to derive geospatial queries from a given method using NEAR and WITHIN keywords like:

interface PersonRepository extends CrudRepository<Person, String> {

	List<Person> findByAddressLocationNear(Point point, Distance distance);

	List<Person> findByAddressLocationWithin(Circle circle);
}

Partial updates on the Point itself also trigger an index refresh operation. So it is possible to alter existing entities via:

template.save(new PartialUpdate<Person>("1", Person.class).set("address.location", new Point(17, 18));

Original pull request: #215.
2016-09-13 15:43:28 +02:00
Christoph Strobl
5d09272876 DATAREDIS-551 - Polishing.
Fix indentation.

Original Pull Request: #220
2016-09-13 10:10:23 +02:00
Mark Paluch
5aef8c3b0b DATAREDIS-551 - Fix pageable query execution when derived criteria is empty.
We now make sure to count records without using criteria when derived criteria is empty. This allows usage of declared query methods using `Pageable` without criteria like `findBy(Pageable page)`.

Original Pull Request: #220
2016-09-13 10:10:16 +02:00
Mark Paluch
a8462c597e DATAREDIS-547 - Polishing.
Return empty list if offset is greater than the available data set. Update supported keywords in reference docs.

Original pull request: #216.
2016-09-12 14:53:07 +02:00
Christoph Strobl
83ff5ec85b DATAREDIS-547 - Fix query execution when derived criteria is empty.
We now make sure to pipe finder queries without any criteria to the according find all method. This allows usage of `PagingAndSortingRepository.findAllBy(Pageable page)` as well as finders without any criteria like `findTop3By()`.

Original pull request: #216.
2016-09-12 14:52:51 +02:00
Mark Paluch
d4af51e77d DATAREDIS-531 - Polishing.
Use quit method for close verification in tests. Refine static imports. Fix spelling.

Original pull request: #218.
2016-09-05 11:24:00 +02:00
Christoph Strobl
58d23dea37 DATAREDIS-531 - Scan commands should use a dedicated bound connection.
SCAN, SSCAN, HSCAN and ZSCAN now reference a dedicated connection that is bound to the Cursor. This allows creation of multiple cursors for different threads without the risk of potentially sharing a single connection. As before the caller is responsible for closing the Cursor correctly after usage.

Original pull request: #218.
2016-09-05 11:23:40 +02:00
Christoph Strobl
5fd719bd8a DATAREDIS-548 - Polishing.
Added connection starvation test for operations during readonly transaction.

Original Pull Request: #214
2016-08-30 13:00:52 +02:00
Mark Paluch
53c7f80676 DATAREDIS-548 - Release connection after command execution in read-only transactions.
We now unbind and release the connection from the transaction resources after a Redis command is invoked. Redis read operations return always null while using RedisTemplate in a transaction so Redis read transactions are not useful.

Previously, RedisConnection's were bound as transactional resource when used in the scope of a @Transactional(readOnly = true) method but not released on transaction completion. This was, because connections are not registered with a transaction synchronizer.

Original Pull Request: #214
2016-08-30 13:00:31 +02:00
Christoph Strobl
b47fc350e0 DATAREDIS-539 - Replace call to deprecated addCache in RedisCacheManager.
We now rely on getMissingCache and loadCaches for initialization instead of explicitly calling deprecated addCache method.

Original pull request: #212.
2016-08-22 10:51:58 +02:00
Oliver Gierke
316097ce06 DATAREDIS-487 - Prepare 1.8 M1 (Ingalls). 2016-07-27 13:51:38 +02:00
Oliver Gierke
fd2bf67453 DATAREDIS-487 - Updated changelog. 2016-07-27 13:51:35 +02:00
Christoph Strobl
eb210a4b8a DATAREDIS-506 - Polishing.
Make use of CollectionUtils and remove duplicate code paths.

Original Pull Request: #211
2016-07-26 15:48:21 +02:00
Mark Paluch
836900e034 DATAREDIS-506 - Reformat test and add ticket references.
Original Pull Request: #211
2016-07-26 15:48:15 +02:00
Mark Paluch
1a332c0f57 DATAREDIS-506 - Upgrade to Jedis 2.9.0.
We now support Jedis 2.9.0 with Redis Standalone SSL and Redis Cluster with passwords. The code is compatible with Jedis 2.8.0 when not using SSL or Redis Cluster with passwords.

Original Pull Request: #211
2016-07-26 15:48:03 +02:00
Christoph Strobl
34f2d95669 DATAREDIS-540 - Assert compatibility with Spring 5.
Fix testsetup and add Spring-5 build profile to travis.yml.
2016-07-26 15:22:40 +02:00
Christoph Strobl
f606d06b30 DATAREDIS-537 - Polishing.
Move duplicate code into single place and use ternary expressions where applicable.
Use static imports in tests where applicable.

Original Pull Request: #210
2016-07-25 14:46:51 +02:00
Mark Paluch
c7c9a8aab5 DATAREDIS-537 - Add support for Redis Cluster and SSL.
Support SSL, StartTLS and VerifyPeer flags.

Original Pull Request: #210
2016-07-25 14:13:25 +02:00
Mark Paluch
fd6e4d12ea DATAREDIS-523 - Polishing.
Allow reading of the TTL into primitive properties. Allow general numeric types for TTL properties. Extend date range in license headers. Extend JavaDoc.

Original pull request: #208.
2016-07-13 08:51:48 +02:00
Christoph Strobl
c4ddc9e125 DATAREDIS-523 - Read back TTL into property.
We now read back TTL value from Redis for explicitly @TimeToLive annotated properties.

Original pull request: #208.
2016-07-13 08:51:16 +02:00
Mark Paluch
e8a30a79a0 DATAREDIS-526 - Allow using ttl and pttl with TimeUnit on connection-level.
We now support ttl and pttl accepting a TimeUnit on connection level to return the TTL in the requested time unit. By performing the conversion inside the connection we return correct results for plain, pipelining and transaction execution. Add also JavaDoc and @Override to ttl/pttl methods.

Original pull request: #205.
2016-07-08 08:50:56 +02:00
Mark Paluch
5a3a754985 DATAREDIS-526 - Polishing.
Add author tag. Apply formatting. Add ticket references to test methods.
Original pull request: #205.
2016-07-08 08:50:53 +02:00
oudb
e64f84b45a DATAREDIS-526 - Fix getExpire return value.
getExpire returns now negative values without time unit conversion in case of absent values or values without a TTL set.

CLA: 143520151016081625 (Duobiao Ou)
Original pull request: #205.
2016-07-08 08:50:30 +02:00
Christoph Strobl
f5a506cb8d DATAREDIS-530 - Fix PartialUpdate removing existing indexes.
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.
2016-07-06 14:34:29 +02:00
Christoph Strobl
0d24b5a573 DATAREDIS-524 - Polishing.
Some formatting changes.

Original Pull Request: #204
2016-07-06 14:16:18 +02:00
Mark Paluch
ea33cd40e6 DATAREDIS-524 - Use password to connect Redis nodes using Sentinel.
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
2016-07-06 14:16:08 +02:00
Mark Paluch
74a5652ff0 DATAREDIS-505 - Polishing.
Extend date range in license header. Retrieve connection and config for possible reconfiguration only if keyspaceNotificationsConfigParameter has a value.

Original pull request: #202.
2016-06-17 13:07:31 +02:00
Christoph Strobl
65c7b2c23e DATAREDIS-505 - Allow configuration of Redis Keyspace events config value.
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.
2016-06-17 13:07:20 +02:00
Mark Paluch
64456ea134 DATAREDIS-500 - Polishing.
Apply formatting rules. Use differing serializers in test.

Original pull request: #190.
2016-06-17 09:35:57 +02:00
Anqing Shao
73c8ce2009 DATAREDIS-500 - Use Hash Key and Hash Value serializers in RedisTemplate executePipelined(…).
RedisTemplate executePipelined(RedisCallback) uses now the Hash Key and Hash Value serializers to deserialize the response.

Original pull request: #190.
CLA: 174020160421053943 (Anqing Shao).
2016-06-17 09:35:57 +02:00
Oliver Gierke
31d8ab296f DATAREDIS-488 - Updated changelog. 2016-06-15 14:31:49 +02:00
Christoph Strobl
67106bc75a DATAREDIS-510 - Fix caching of null values.
We now no longer add empty byte[] as cache value but return null instead.

Original pull request: #201.
2016-06-14 16:56:47 +02:00
Mark Paluch
28b5d61029 DATAREDIS-516 - Update required Spring framework version in reference documentation.
The documentation now uses a property to pull in the Spring framework version used at build time.
2016-06-07 08:29:00 +02:00
Christoph Strobl
7af8fdf946 DATAREDIS-513 - Fix RedisServerCommands.time() failure when in pipeline mode.
We fixed a glitch in Jedis/Lettuce RedisConneciton TIME command when used in pipeline or transaction mode.

Original pull request: #199.
2016-06-02 09:33:19 +02:00
Christoph Strobl
2b51966768 DATAREDIS-514 - Unify geoRadius capitalization.
Unify capitalization of geoRadius to match other geo prefixed operations.

Original pull request: #200.
2016-05-27 09:36:38 +02:00