DATAREDIS-191
- Wrap native Exceptions in RedisConnectionFailureExceptions
- Support switching from shared to non-shared connection
by resetting shared connection in afterPropertiesSet
As a convenience when configuring with Java, added another constructor
call that allows setting the delegate and the default listener method
in one line of code.
```java
public MessageListenerAdapter(Object delegate, String defaultListenerMethod) {
this(delegate);
setDefaultListenerMethod(defaultListenerMethod);
}
```
This supports configuring a POJO-based listener with a single step:
```java
@Test
public void testCustomMethodWithAlternateConstructor() throws Exception {
MessageListenerAdapter adapter = new MessageListenerAdapter(target, "customMethod");
adapter.afterPropertiesSet();
adapter.onMessage(STRING_MSG, null);
verify(target).customMethod(PAYLOAD);
}
```
A pure Java configuration bean can now look like this:
```java
@Bean
MessageListenerAdapter listenerAdapter(Receiver receiver) {
return new new MessageListenerAdapter(receiver, "pojoMethod");
}
@Bean
Receiver receiver() {
return new Receiver();
}
```
No longer do we have to A) assign the adapter to a variable and B) call
setDefaultListenerMethod, slimming down pure POJO configuration with pure
Java.
with Redis 2.6
Redis 2.6 responds to unsubscribe requests even if
not subscribed. This results in unread data on the
InputStream on Subscription close if extra
unsubscribe requests are issued. This causes
problems if connection is reused
(as in the case of Jedis pool).
- Only unsubscribe on Subscription close if still
subscribed
- Use dedicated connection for RJC subscriptions,
as RJC makes extra unsubscribe calls on subscriber
close
DATAREDIS-132, DATAREDIS-130, DATAREDIS-152
- Upgrade to fix broken config_get in SRP 0.2
- Fix syntax errors in sort methods
- Fix syntax errors in zRange/zRevRange methods
with offset and count
executed in the tx
DATAREDIS-123
- Close pipeline on exec if not explicitly
opened by user and return results of closePipeline,
not result of exec command
- Close pipeline on discard if not explicitly
opened by user
- Prevent simultaneous write of subscribe/unsubscribe using the same Connection
- Fix test failure by re-initializing "done" state of SubscriptionTask between runs and adding waits
DATAREDIS-124
- Close connection when SubscriptionTask is canceled and subscribing thread is unblocked
- Ensure non-blocking Lettuce and SRP only attempt
to close subscriptions if active
- Cleanup unecessary synchronization between
SubscriptionTask methods, now that connection is
no longer set to null
- Cleanup unused monitor notify when SubscriptionTask thread ends
- Add tests for all Connection methods
- Add tests for all Connection methods through pipeline
- Clean up DB between Connection test runs
- Reduce sleeps in pub/sub tests to improve execution time
While the (hash) increment() method accepts a long argument (and Redis
HINCRBY/INCRBY/DECRBY treats arguments as 64 bits), it is cast to a
32bits signed int in the JedisConnection class.
- Removed offensive (& unnecessary) casts
- Extended integration tests with incrBy, decrBy and hIncrBy to
demonstrate handling of large numbers
- Fixed typos in test support
(CollectionTestParams, AbstractConnectionIntegrationTests)
Issue: DATAREDIS-117
SRP unsubscribes asynchronously, so occasionally not all messages were delivered prior to unsubscribe. Test will now unsubscribe on connection close instead.
- DATAREDIS-118
- Change method return type back to void to fix backwards
compatibility issues
- Modify tests to assert specific clients receive or
don't receive messages vs comparing expected client counts