Commit Graph

242 Commits

Author SHA1 Message Date
Jennifer Hickey
6d21cda407 Validate converted pipeline results in conn tests
DATAREDIS-200
2013-07-17 14:39:12 -07:00
Jennifer Hickey
dd8b0561ea Add deserialize of pipeline results to DefaultStringRedisConnection
DATAREDIS-200
2013-07-17 11:23:51 -07:00
Jennifer Hickey
daca61be03 Convert SRP pipelined results to correct data type
DATAREDIS-200

- Convert return of closePipeline() to same types
returned from individual operations

- Change SRP execute to return Reply.data() 
instead of Reply for consistency with pipeline
2013-07-16 14:05:41 -07:00
Jennifer Hickey
b2325c90d8 Convert Lettuce pipelined results to correct data type
DATAREDIS-200
2013-07-16 14:05:41 -07:00
Jennifer Hickey
14b84ab2af Fix StringRedisConnection not passed to callbacks in StringTemplate.execute()
DATAREDIS-222
2013-07-16 14:02:40 -07:00
Jennifer Hickey
9bad0adfa4 Test script load and flush in pipeline 2013-07-16 10:02:20 -07:00
Jennifer Hickey
bbd6822655 Fix SRP test timing issue 2013-07-16 09:35:31 -07:00
Jennifer Hickey
ae6e6153c7 Add connection integration tests 2013-07-16 09:34:58 -07:00
Jennifer Hickey
39970609ba Fix SRP exception on select in transaction
DATAREDIS-220
2013-07-15 18:05:10 -07:00
Jennifer Hickey
4f5eb9748a Fix NPEs on Jedis closePipeline/exec after move
DATAREDIS-218
2013-07-15 14:34:43 -07:00
Jennifer Hickey
11e4b03dcb Support null sortParams in Lettuce and SRP sort
DATAREDIS-217
2013-07-15 13:49:37 -07:00
Jennifer Hickey
95e8fbff27 Fix DefaultStringRedisConnection not passing begin/end to bitCount method
DATAREDIS-216
2013-07-12 09:44:17 -07:00
Jennifer Hickey
5c055286f4 Fix IllegalMonitorStateException in RedisCache
DATAREDIS-214
2013-07-11 12:16:00 -07:00
Jennifer Hickey
0729055381 Fix conns wrapping UnsupportedOperationException
in RedisSystemException

DATAREDIS-146
2013-07-03 17:11:02 -07:00
Jennifer Hickey
687f5f0d2c Lazily instantiate Lettuce dedicated connections 2013-07-01 17:42:07 -07:00
Jennifer Hickey
ba8ab92b0f Support srandmember with negative count
DATAREDIS-116
2013-07-01 11:33:02 -07:00
Jennifer Hickey
62d2fe26cb Upgrade to SRP 0.7
DATAREDIS-205
2013-06-30 15:01:20 -07:00
Jennifer Hickey
d07967a183 Upgrade to Lettuce 2.3.3
DATAREDIS-204
2013-06-30 13:00:42 -07:00
Jennifer Hickey
7b75924c40 Add authentication to Lettuce conn factory and pool
DATAREDIS-202
2013-06-28 16:50:14 -07:00
Jennifer Hickey
29b68e2808 Remove passing both connection info and pool to LettuceConnFactory 2013-06-28 15:41:40 -07:00
Jennifer Hickey
83a507bf1d Add Redis 2.6 info(section) method to Connections
DATAREDIS-183
2013-06-24 18:15:39 -07:00
Jennifer Hickey
e9d1901298 Change mSetNX/multiSetIfAbsent return type to Boolean
DATAREDIS-177
2013-06-24 17:31:47 -07:00
Jennifer Hickey
7173be2c28 Add Redis 2.6 srandmember with count to SetOperations
DATAREDIS-116
2013-06-24 16:39:45 -07:00
Jennifer Hickey
c1337d5067 Add Redis 2.6 srandmember with count to Connections
DATAREDIS-116
2013-06-24 16:39:24 -07:00
Jennifer Hickey
cc9b0821a0 Add wrapper for GenericObjectPool.Config for Spring 2013-06-24 13:50:52 -07:00
Jennifer Hickey
b79f7b8df0 Allow Lettuce connection pool for dedicated conns
DATAREDIS-201 

Inject LettucePool into LettuceConnectionFactory
to be used for a "dedicatedConnection". Dedicated 
connections are used only for blocking and tx ops
when a shared connection is used. If shareNativeConnection
is set to false, the dedicated conn will be
used for all ops.
2013-06-24 10:50:18 -07:00
Jennifer Hickey
88910d9324 Add Lettuce connection pool for non-shared conns 2013-06-24 10:27:11 -07:00
Jennifer Hickey
bae8a579d5 Factor JredisPool to a common Pool interface 2013-06-24 10:27:11 -07:00
Jennifer Hickey
2c9ba9a5ed Add Redis 2.6 scripting commands to Connections
DATAREDIS-180
2013-06-19 21:52:34 -07:00
Jennifer Hickey
844782384d Fix decimal precision error in RedisMapTests 2013-06-17 17:42:20 -07:00
Jennifer Hickey
cc851c674e Add Redis 2.6 incrbyfloat to ValueOperations
DATAREDIS-181
2013-06-17 17:16:45 -07:00
Jennifer Hickey
128360d43c Add Redis 2.6 hincrbyfloat to RedisMap and HashOperations
DATAREDIS-181
2013-06-17 16:26:10 -07:00
Jennifer Hickey
ced5a755e9 Add Redis 2.6 incrBy/hincrBy float ops to Connections
DATAREDIS-181
2013-06-17 15:06:55 -07:00
Jennifer Hickey
45627760aa Add Redis 2.6 bitop and bitcount commands to Connections
DATAREDIS-179
2013-06-17 13:39:47 -07:00
Jennifer Hickey
9c49db2949 Add Redis 2.6 dump and restore commands to RedisTemplate
DATAREDIS-182
2013-06-16 13:23:15 -07:00
Jennifer Hickey
ff60d0d290 Add Redis 2.6 dump and restore commands to Connections
DATAREDIS-182
2013-06-16 13:20:52 -07:00
Jennifer Hickey
5817e24b9e Return null from SRP exec if watched value modified
DATAREDIS-168
2013-06-13 22:35:06 -07:00
Jennifer Hickey
37e79bafd5 Upgrade to SRP 0.6
DATAREDIS-186

- Handle a few method signature changes to varargs

- Handle possibility of exec() throwing Exceptions
if ErrorReply received in Redis 2.6
2013-06-13 15:25:12 -07:00
Jennifer Hickey
1f87bc24d5 Add framework for running tests based on Redis version 2013-06-12 17:29:41 -07:00
Jennifer Hickey
a4f3d7db44 Add Redis 2.6 millisecond expiration commands
DATAREDIS-178

Add pExpire, pExpireAt, pTTl ops to connections
2013-06-12 14:03:00 -07:00
Jennifer Hickey
80ac1af812 Refactor connection tests with waitFor method
- Support more general test conditions that
require period checking until timeout occurs
2013-06-12 12:26:53 -07:00
Jennifer Hickey
265d4cd18f Add default implementation of JredisPool
- Add DefaultJredisPool to pool JRedis connections

- Prevent returning the same resource to the pool
multiple times on JredisConnection close

- Fixes DATAREDIS-154 previous JRedis pool left
broken connections in the pool
2013-06-11 18:02:07 -07:00
Jennifer Hickey
280e6a6ccc Upgrade to JRedis master
DATAREDIS-54, DATAREDIS-174, DATAREDIS-129

- Switch to original JRedis for 2.6 support

- Remove base64 encoding as new JRedis supports binary
keys

- Add JredisPool interface to replace removed
JRedisService and pool implementation

- Temporarily switch integration tests to use
non-pooled connections

- Throw more specific Exception on JRedis connection
failures
2013-06-11 17:56:25 -07:00
Jennifer Hickey
dffa1de6d1 Remove RJC driver due to lack of Redis 2.6 support
DATAREDIS-185
2013-06-11 15:25:01 -07:00
Jennifer Hickey
66139f9fae Wrap native Exceptions in LettuceConnectionFactory
DATAREDIS-191

- Wrap native Exceptions in RedisConnectionFailureExceptions 

- Support switching from shared to non-shared connection
by resetting shared connection in afterPropertiesSet
2013-06-04 11:54:21 -07:00
Greg Turnquist
49dc960ab2 Add alternate constructor to MessageListenerAdapter
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.
2013-05-31 11:16:31 -04:00
Jennifer Hickey
7c8dafce67 Redis timeouts should not be converted to 0
DATAREDIS-176

Only convert timeouts in Redis commands to 0 sec if
the value to convert is 0, otherwise round up to 1
2013-05-30 11:05:03 -07:00
Jennifer Hickey
db7b07788f Fix Lettuce compareAndSet
DATAREDIS-122

- exec() now returns null if value modified by other thread

- Use same connection for watch/unwatch and txs
2013-05-28 13:55:53 -07:00
Jennifer Hickey
0c9e8f5054 Fix corrupt subscription connections return to pool
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
2013-04-17 10:03:09 -07:00
Jennifer Hickey
a41c433c97 Move common test functionality to helper classes 2013-04-16 20:14:05 -07:00