Merge branch 'master' into 2.0

Conflicts:
	src/main/java/org/redisson/RedissonBlockingQueue.java
	src/test/java/org/redisson/RedissonBlockingQueueTest.java
pull/243/head
Nikita 10 years ago
commit 16e770cd46

@ -54,13 +54,14 @@ Recent Releases
================================
####Please Note: trunk is current development branch.
####??-Jul-2015 - version 1.3.0
####04-Jul-2015 - version 1.3.0 released
Feature - `RQueue.pollLastAndOfferFirstTo` method added
Feature - `RObject.rename`, `RObject.renameAsync`, `RObject.renamenx`, `RObject.renamenxAsync` methods added
Feature - `RList.getAsync`, `RList.addAsync`, `RList.addAllAsync` methods added
Feature - `RObject.deleteAsync` method added
Feature - unix sockets support via `Configuration.useLinuxNativeEpoll` setting
Feature - Redisson.getTopicPattern method added (thanks to alex-sherwin)
Feature - `Redisson.getTopicPattern` method added (thanks to alex-sherwin)
Improvement - `RLock` auto-unlock then client lock-owner is gone (thanks to AndrewKolpakov)
Improvement - lua scripts used instead of multi/exec commands to avoid connection errors during execution (thanks to AndrewKolpakov)
Improvement - `RObject.delete` method now returns `boolean` status
Improvement - propagate Command processing exceptions to ConnectionManager (thanks to marko-stankovic)
@ -193,7 +194,7 @@ Include the following to your dependency list:
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>1.2.1</version>
<version>1.3.0</version>
</dependency>
### Supported by

@ -31,6 +31,9 @@ public class KeyValueObjectDecoder implements MultiDecoder<Object> {
@Override
public Object decode(List<Object> parts) {
if (parts.isEmpty()) {
return null;
}
return new KeyValueMessage(parts.get(0), parts.get(1));
}

@ -15,6 +15,13 @@ import org.redisson.core.*;
public class RedissonBlockingQueueTest extends BaseTest {
@Test
public void testPoll() throws InterruptedException {
RBlockingQueue<Integer> queue1 = redisson.getBlockingQueue("queue1");
queue1.put(1);
Assert.assertEquals((Integer)1, queue1.poll(2, TimeUnit.SECONDS));
Assert.assertNull(queue1.poll(2, TimeUnit.SECONDS));
}
@Test
public void testAwait() throws InterruptedException {
RBlockingQueue<Integer> queue1 = redisson.getBlockingQueue("queue1");
@ -23,8 +30,7 @@ public class RedissonBlockingQueueTest extends BaseTest {
Assert.assertEquals((Integer)1, queue1.poll(10, TimeUnit.SECONDS));
}
@Test
public void testPollLastAndOfferFirstTo() throws InterruptedException {
@Test public void testPollLastAndOfferFirstTo() throws InterruptedException {
RBlockingQueue<Integer> queue1 = redisson.getBlockingQueue("queue1");
queue1.put(1);
queue1.put(2);

Loading…
Cancel
Save