Commit Graph

1378 Commits

Author SHA1 Message Date
Oliver Gierke
6972e12824 DATAREDIS-587 - After release cleanups. 2017-01-26 10:57:48 +01:00
Oliver Gierke
9b6a45822a DATAREDIS-587 - Prepare next development iteration. 2017-01-26 10:57:45 +01:00
Oliver Gierke
76991fb12c DATAREDIS-587 - Release version 1.8 GA (Ingalls). 2017-01-26 10:27:10 +01:00
Oliver Gierke
abee0748c8 DATAREDIS-587 - Prepare 1.8 GA (Ingalls). 2017-01-26 10:26:35 +01:00
Oliver Gierke
b1961412fd DATAREDIS-587 - Updated changelog. 2017-01-26 10:26:33 +01:00
Christoph Strobl
f8d1eff247 DATAREDIS-594 - Update "what’s new" section in reference documentation. 2017-01-23 08:33:37 +01:00
Mark Paluch
9b2e347c0c DATAREDIS-593 - Use Enum.name() to represent enum values.
We now serialize Enum values using their name (Enum.name()) instead of using their string representation (Enum.toString()). toString can be customized in Enums to no longer report their name but a different value. A customized value cannot be used to reinstantiate the Enum value, only its name.

This change affects serialization and will only affect new/updated values. Stored values with a customized toString representation still can't be deserialized until they were updated in Redis.

Original Pull Request: #235
2017-01-20 11:11:59 +01:00
Mark Paluch
1d089b44dc DATAREDIS-592 - Simplify test code in RedisCacheUnitTests.
Remove superfluous `times(1)` declaration in mock verification.

Original Pull Request: #234
2017-01-20 10:06:37 +01:00
Mark Paluch
cbbfad481c DATAREDIS-592 - Consider expiry timeout in synchronized RedisCache mode.
We now consider the element expiry when retrieving cache elements with a value loader. Previously, all cache elements that were cached using `@Cacheable(sync=true)` or used `RedisCache.get(Object, Callable)` directly were considered eternal without setting a TTL.

Original Pull Request: #234
2017-01-20 10:05:27 +01:00
Mark Paluch
d97117b0a2 DATAREDIS-591 - Update project documentation with the CLA tool integration. 2017-01-13 11:50:10 +01:00
Christoph Strobl
f75cf494f6 DATAREDIS-564 - Polishing.
Remove white spaces, update license header.
Add ticket reference to existing testcase.

Original Pull Request: #228
2017-01-13 09:30:35 +01:00
Mark Paluch
9d1e517099 DATAREDIS-564 - Delegate expire(…) to pExpire if timeout exceeds Integer.MAX_VALUE.
Remove pExpireAt workaround that can lead to NullPointerException if called within a transaction/pipeline. Calls to expire(…) with a timeout greater Integer.MAX_VALUE are delegated to pExpire converting seconds to milliseconds.

Related ticket: DATAREDIS-286.
Original Pull Request: #228
2017-01-13 09:30:02 +01:00
Mark Paluch
d00ab8c8f1 DATAREDIS-589 - Polishing.
Run expiry tests only when executing long-running tests. Guard RedisConnectionFactory against multiple initializations. Synchronize key expiry. Remove unused code. Extend years in license header.

Original pull request: #232.
2017-01-12 15:01:40 +01:00
Christoph Strobl
0f7607e515 DATAREDIS-589 - Move secondary index cleanup to MappingExpirationListener.
We now no longer rely on ApplicationEvents captured in the RedisKeyValueAdapter for performing cleanup operations for expired keys, but do this along with the phantom key removal. This removes a flaw when initializing a non repository related KeyspaceEventListener publishing events that actually are unrelated to the Adapter.

Additionally upgraded test infrastructure to utilize Redis 3.2.6 with disabled protected-mode and enabled keyspace-events.

Original pull request: #232.
2017-01-12 14:52:31 +01:00
Mark Paluch
0999c04332 DATAREDIS-532 - Enhance JavaDoc and convert links to Redis documentation.
Extend JavaDoc documentation for Command/Connection/Operation interfaces. Align method ordering in operation interfaces with connection/commands interfaces.
2017-01-12 14:52:30 +01:00
Mark Paluch
154f74c408 DATAREDIS-563 - Migrate ticket references in test code to Spring Framework style. 2017-01-12 14:52:13 +01:00
Oliver Gierke
2b93ca3dfe DATAREDIS-566 - Updated changelog. 2016-12-21 19:35:40 +01:00
Oliver Gierke
20010d1c16 DATAREDIS-541 - After release cleanups. 2016-12-21 16:33:13 +01:00
Oliver Gierke
abd1748867 DATAREDIS-541 - Prepare next development iteration. 2016-12-21 16:33:11 +01:00
Oliver Gierke
a8c146b3b7 DATAREDIS-541 - Release version 1.8 RC1 (Ingalls). 2016-12-21 16:16:51 +01:00
Oliver Gierke
70e0fcb413 DATAREDIS-541 - Prepare 1.8 RC1 (Ingalls). 2016-12-21 16:15:48 +01:00
Oliver Gierke
d35a25c8ad DATAREDIS-541 - Updated changelog. 2016-12-21 16:15:43 +01:00
Mark Paluch
1f40606d49 DATAREDIS-584 - Use newer Java 8 on Travis CI. 2016-12-16 11:23:48 +01:00
Oliver Gierke
4e296cc223 DATAREDIS-583 - Adapt API in RedisRepositoryFactoryBean.
Related tickets: DATACMNS-891.
2016-12-15 16:23:38 +01:00
Mark Paluch
21e6235d55 DATAREDIS-579 - Register RedisRepositoryFactory in spring.factories.
This is required for the switch in support for multi-store detection.

Related ticket: DATACMNS-952.
2016-12-05 17:14:30 +01:00
Mark Paluch
116be39a7e DATAREDIS-552 - Polishing.
Apply client name to Sentinel and unpooled connections if set. Add ticket references to JavaDoc. Add tests. Fix existing JavaDoc letter casing and punctuation. Rearrange isClusterAware/isRedisSentinelAware methods.

Original pull request: #219.
2016-12-01 09:01:26 +01:00
Fu Jian
9117352ac0 DATAREDIS-552 - Support client name configuration for JedisConnectionFactory.
Motivation:
JedisConnectionFactory should support setting clientName for Jedis connections
so to improve troubleshooting.

Result:
Easier to troubleshooting with connection name.

Original pull request: #219.
2016-12-01 09:01:26 +01:00
Oliver Gierke
4bab94b359 DATAREDIS-568 - Updated changelog. 2016-11-23 13:52:48 +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
Mark Paluch
0b9b1804ff DATAREDIS-558 - Use version range for SLF4J in OSGi manifest template.
Use version range to not lock SLF4J to a particular patch version. The range spans from the current version to the next major version.
2016-10-05 09:24:45 +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