Commit Graph

1760 Commits

Author SHA1 Message Date
Mark Paluch
f3ec8782cd DATAREDIS-885 - Updated changelog. 2018-11-27 14:54:09 +01:00
Mark Paluch
0db274b381 DATAREDIS-879 - Updated changelog. 2018-11-27 12:36:49 +01:00
Mark Paluch
783565ab8d DATAREDIS-880 - Updated changelog. 2018-11-27 11:27:24 +01:00
Mark Paluch
1887aa6eef DATAREDIS-897 - Upgrade to Lettuce 5.1.3. 2018-11-26 16:44:11 +01:00
Mark Paluch
b440dc1f1f DATAREDIS-873 - Polishing.
Add since tags. Add tests. Reformat code. Update docs.

Original pull request: #361.
2018-11-23 12:01:56 +01:00
Dominys
724579b8a9 DATAREDIS-873 - Accept single collection parameter in SetOperations diff/inter/union methods.
We now accept a single collection parameter containing keys for diff/inter/union and their …store methods. Note that diff requires a specific key order to denote the initial set to compare to.

Original pull request: #361.
2018-11-23 12:01:46 +01:00
Mark Paluch
6921ab01bf DATAREDIS-890 - Polishing.
Add author tags. Use try-with-resources to close Jedis.

Original pull request: #373.
2018-11-23 10:18:00 +01:00
ChenGuanqun
9d47c48e22 DATAREDIS-890 - Randomize Redis Cluster node order before topology retrieval.
We now shuffle the set of Redis Cluster nodes before retrieving the topology. This change reduces load on the first node in the known nodes set.

Original pull request: #373.
2018-11-23 10:18:00 +01:00
Christoph Strobl
dc0ce19cd0 DATAREDIS-864 - Polishing.
Update Javadoc, remove unused code and fix some warnings.

Original Pull Request: #356
2018-11-22 10:50:09 +01:00
Mark Paluch
8858e0f1be DATAREDIS-864 - Leave XREAD COUNT unconfigured if not configured through builder.
XREAD does no longer apply a COUNT if the count was left unconfigured on StreamReadOperationsBuilder. This removes the limitation of batch size 1 and allows generally an increased throughput in default configuration.

Original Pull Request: #356
2018-11-22 10:49:27 +01:00
Mark Paluch
eafcb331d8 DATAREDIS-864 - Polishing.
Exract nested Stream types into connection.stream package. Extract common code from Template-API based toObjectRecord handling into StreamObjectMapper.

StreamReceiver and StreamMessageListenerContainer now can emit MapRecord or ObjectRecord for easier consumption of stream records.

Original Pull Request: #356
2018-11-22 10:49:06 +01:00
Christoph Strobl
13648d7c85 DATAREDIS-864 - Allow simple types to be added to Redis Stream.
Move API so the stream is more like the hash having dedicated serializers for fields and their values. Also allow appending simple types such as string directly to a stream without having to go through creating a Map. Those simple types can also be read back.
Provide means to hash complex objects when added to the stream.

Update Documentation.

Original Pull Request: #356
2018-11-22 10:48:16 +01:00
Mark Paluch
65754623f6 DATAREDIS-864 - Add support for Redis Streams.
We now support Redis Streams to add, read and consume stream records. We introduced StreamOperations, BoundStreamOperations, and ReactiveStreamOperations to interact with Redis Streams using imperative and reactive programming models. Record represents items within a stream. There are various flavors of Stream Records:

* MapRecord (maps to the hash body used in stream messages).
* Binary MapRecord: byte[] and ByteBuffer variants of MapRecord.
* ObjectRecord: Simple and Complex Objects mapped onto the stream body hash using ObjectHashMapper.

Redis Streams are supported for the Lettuce client only as Jedis has not received yet Redis Stream support.

Messages can be created as Map or as object:

redisTemplate.opsForStream().add("my-stream", Collections.singletonMap("key", "value"));

redisTemplate.opsForStream().add(ObjectRecord.create("my-logins", new LoginEvent(…)));

Streams can be consumed by using a StreamMessageListenerContainer that allows for stream subscriptions or a StreamReceiver.

Synchronous Message Listener:

StreamMessageListenerContainer<String, MapRecord<String, String, String>> container = StreamMessageListenerContainer
      .create(connectionFactory);
container.start();

Subscription subscription = container.receive(StreamOffset.fromStart("my-stream"), record -> … );

Reactive Message Receiver:

StreamReceiverOptions<String, ObjectRecord<String, LoginEvent>> receiverOptions = StreamReceiverOptions.builder()
      .targetType(LoginEvent.class).build();

StreamReceiver<String, ObjectRecord<String, LoginEvent>> receiver = StreamReceiver.create(connectionFactory, receiverOptions);

Flux<ObjectRecord<String, LoginEvent>> messages = receiver.receive(StreamOffset.fromStart("my-logins"));

Original Pull Request: #356
2018-11-22 10:46:21 +01:00
Mark Paluch
f2544a253a DATAREDIS-878 - Updated changelog. 2018-10-29 14:30:35 +01:00
Mark Paluch
ecba2f50c1 DATAREDIS-884 - Upgrade to Lettuce 5.1.2.RELEASE. 2018-10-29 08:23:17 +01:00
Mark Paluch
910e34067b DATAREDIS-875 - Polishing.
Reformat code.

Original pull request: #368.
2018-10-25 14:54:31 +02:00
Christoph Strobl
713a12bce9 DATAREDIS-875 - Omit MappingRedisConverter type hint for primitive type properties.
We now additionally check if the target property is a primitive type and do no longer add the type hint if so.

Original pull request: #368.
2018-10-25 14:53:34 +02:00
Mark Paluch
acd8b6bd4a DATAREDIS-872 - Polishing.
Create unit tests for RedisAtomic counter initialization. Refactor setIfAbsent(…) method to initializeIfAbsent() to not expose additional API methods.

Original pull request: #367.
2018-10-19 12:30:03 +02:00
ningwei
2d4fbc9aa0 DATAREDIS-872 - Fix race condition in RedisAtomic counters initialization.
We now use setIfAbsent to initialize RedisAtomic counters if no initial value was given. Using setIfAbsent turns the initialization into a single atomic step that prevents race conditions of the previously check and set method that required two Redis commands.

Previously, concurrent processes (threads, external changes to Redis) could set the initial value between the existence check and the value set operation that caused the last participant to win.

Original pull request: #367.
2018-10-19 12:27:33 +02:00
Mark Paluch
66945e6292 DATAREDIS-876 - Upgrade to Commons Pool2 2.6.0. 2018-10-16 15:29:48 +02:00
Mark Paluch
6132799353 DATAREDIS-881 - Polishing.
Add author tags. Reformat code. Javadoc, add tests.

Original pull request: #363.
2018-10-16 15:02:42 +02:00
Yanming Zhou
8e8861cbcd DATAREDIS-881 - Allow configuration of Lettuce's quiet shutdown period.
LettuceClientConfigurationBuilder now allows configuration of the quiet shutdown period to improve shutdown time of the Netty EventLoop when using non-shared ClientResources.

Original pull request: #363.
2018-10-16 15:00:32 +02:00
Mark Paluch
148b1ae582 DATAREDIS-874 - Polishing.
Reformat code. Add since tags. Extend tests.

Align Javadoc tonality across RedisAtomic… types.

Original pull request: #362.
2018-10-16 12:08:07 +02:00
Graham MacMaster
f2107ef81b DATAREDIS-874 - Implement accumulate/update methods on RedisAtomic[*] classes.
This commit adds the following public methods to RedisAtomicInteger,
RedisAtomicLong, and RedisAtomicDouble:

T accumulateAndGet(T updateValue, BinaryOperator<T> accumulatorFunction);
T getAndAccumulate(T updateValue, BinaryOperator<T> accumulatorFunction);
T updateAndGet(UnaryOperator<T> updateFunction);
T getAndUpdate(UnaryOperator<T> updateFunction);

These methods are primarily useful for doing CAS operations with the
help of Binary/UnaryOperators to generate the new value. They mirror
their counterparts on the AtomicInteger and AtomicLong classes
available in the java.util.concurrent.atomic package.

Original pull request: #362.
2018-10-16 12:08:07 +02:00
Mark Paluch
7ab8ade8d3 DATAREDIS-866 - Updated changelog. 2018-10-15 14:30:21 +02:00
Mark Paluch
d1066fb591 DATAREDIS-871 - Updated changelog. 2018-10-15 11:37:26 +02:00
Mark Paluch
9df7cdaec3 DATAREDIS-861 - After release cleanups. 2018-09-21 07:45:29 -04:00
Mark Paluch
955a55062e DATAREDIS-861 - Prepare next development iteration. 2018-09-21 07:45:27 -04:00
Mark Paluch
17b5181f5c DATAREDIS-861 - Release version 2.1 GA (Lovelace). 2018-09-21 07:08:39 -04:00
Mark Paluch
426bd11bef DATAREDIS-861 - Prepare 2.1 GA (Lovelace). 2018-09-21 07:07:51 -04:00
Mark Paluch
f3e7995ec4 DATAREDIS-861 - Updated changelog. 2018-09-21 07:07:49 -04:00
Christoph Strobl
45cbb21849 DATAREDIS-869 - Polishing.
Rename parameters and add methods with new nomenclature.

Original Pull Request: #355
2018-09-20 10:49:20 +02:00
Mark Paluch
169b1bd174 DATAREDIS-869 - Adapt to nomenclature change about Master/Replica.
We now renamed RedisStaticMasterSlaveConfiguration and StaticMasterSlaveConnectionProvider to RedisStaticMasterReplicaConfiguration respective StaticMasterReplicaConnectionProvider to reflect changes in Redis nomenclature regarding replication.

Original Pull Request: #355
2018-09-20 10:48:46 +02:00
Mark Paluch
a7352f5612 DATAREDIS-869 - Use changed nomenclature in documentation and readme.
Original Pull Request: #355
2018-09-20 10:48:17 +02:00
Christoph Strobl
e253d49f4a DATAREDIS-870 - Upgrade to Lettuce 5.1.0.RELEASE 2018-09-20 10:46:59 +02:00
Mark Paluch
b7545e50e6 DATAREDIS-868 - Include documentation about Repository Object Mapping Fundamentals.
Related ticket: DATACMNS-1374.
2018-09-18 13:22:32 +02:00
Mark Paluch
1ff6661f13 DATAREDIS-854 - Updated changelog. 2018-09-10 14:15:52 +02:00
Mark Paluch
dcb373b70e DATAREDIS-856 - Updated changelog. 2018-09-10 10:20:58 +02:00
Mark Paluch
fd03df48e1 DATAREDIS-862 - Document that Redis Repositories do not work with transactions.
Original pull request: #354.
2018-09-04 10:40:01 +02:00
Mark Paluch
0366154754 DATAREDIS-741 - Polishing.
Outline entity declaration. Fix indentation and typos.

Original pull request: #354.
2018-09-04 10:39:59 +02:00
Christoph Strobl
aaf032445b DATAREDIS-741 - Improve repository operation documentation.
Original pull request: #354.
2018-09-04 10:39:54 +02:00
Mark Paluch
5688d56eab DATAREDIS-708 - Move BGREWRITEAOF and BGSAVE tests to unit tests.
Run tests against Lettuce connection mocks to not interfere with running Redis background processes.

Original Pull Request: #347
2018-08-28 09:57:54 +02:00
Oliver Gierke
1289323f63 DATAREDIS-853 - After release cleanups. 2018-08-20 10:56:53 +02:00
Oliver Gierke
c0babf2d1b DATAREDIS-853 - Prepare next development iteration. 2018-08-20 10:56:52 +02:00
Oliver Gierke
beef8b7eff DATAREDIS-853 - Release version 2.1 RC2 (Lovelace). 2018-08-20 10:40:11 +02:00
Oliver Gierke
1c63d58a7b DATAREDIS-853 - Prepare 2.1 RC2 (Lovelace). 2018-08-20 10:39:43 +02:00
Oliver Gierke
8d97544b5a DATAREDIS-853 - Updated changelog. 2018-08-20 10:39:40 +02:00
Mark Paluch
33e6e8e76e DATAREDIS-844 - Updated changelog. 2018-07-27 11:45:25 +02:00
Mark Paluch
7b4a4c9cc3 DATAREDIS-845 - Updated changelog. 2018-07-26 16:23:58 +02:00
Mark Paluch
c1508df13a DATAREDIS-836 - After release cleanups. 2018-07-26 12:32:28 +02:00