diff --git a/CHANGELOG.md b/CHANGELOG.md index 32565cafa..3e4335d5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ Redisson Releases History ================================ ####Please Note: trunk is current development branch. +####30-Jun-2016 - version 2.2.17 released +Feature - `RMultimap.keySize` method added +Feature - `RKeys.getType` method added +Feature - `RKeys.getKeysByPattern` method with count param added +Improvement - `RedissonMultiLock.lock` method optimization +Feature - `RedissonRedLock` implemented +Fixed - `RMapCache.delete` doesn't delete redisson__idle__set__ +Fixed - integer comparison in EvictionScheduler +Fixed - ByteBuf leak (thanks to jackygurui) +Fixed - `RTopic.addListener` method worked asynchronous sometimes +Fixed - ClastCastException occurred if multi-type PubSub channels were used with single connection +Fixed - PubSub status message decoding +Fixed - RLock.lock can hang in some cases +Fixed - PubSub subscription may stuck in some cases +Fixed - return value of `RedissonMultimap.keySet.size` method + ####12-Jun-2016 - version 2.2.16 released Feature - `RGeo`, `RMultimapCache` added to `RBatch` Feature - `fastRemove` and `fastRemoveAsync` methods were added to `RList` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..8ff70c80c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +## Build Prerequisites ## +Have at least a local copy of built redis, for more information see [tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis). + +Note that redis shouldn't be running - the build will start instances as needed. + +## Running the tests ## + +``` bash +export REDIS_BIN= + +# And finally running the build +mvn -DargLine="-Xmx2g -DredisBinary=$REDIS_BIN/redis-server" -Punit-test clean test -e -X +``` \ No newline at end of file diff --git a/header.txt b/header.txt index 7aa04108f..ac956a4f9 100644 --- a/header.txt +++ b/header.txt @@ -1,4 +1,4 @@ -Copyright 2014 Nikita Koksharov, Nickolay Borbit +Copyright 2016 Nikita Koksharov Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index 3015361d7..aa9067883 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.redisson redisson - 2.2.17-SNAPSHOT + 2.2.18-SNAPSHOT bundle Redisson @@ -42,15 +42,6 @@ +4 - - nkls - Nick Borbit - nborbit@gmail.com - - Developer - - +1 - diff --git a/src/main/java/org/redisson/BaseConfig.java b/src/main/java/org/redisson/BaseConfig.java index c021b6ca9..80c99ec3c 100644 --- a/src/main/java/org/redisson/BaseConfig.java +++ b/src/main/java/org/redisson/BaseConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/BaseMasterSlaveServersConfig.java b/src/main/java/org/redisson/BaseMasterSlaveServersConfig.java index 52c6b254f..93e9f25df 100644 --- a/src/main/java/org/redisson/BaseMasterSlaveServersConfig.java +++ b/src/main/java/org/redisson/BaseMasterSlaveServersConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/ClusterServersConfig.java b/src/main/java/org/redisson/ClusterServersConfig.java index f637338ee..f52a4e458 100644 --- a/src/main/java/org/redisson/ClusterServersConfig.java +++ b/src/main/java/org/redisson/ClusterServersConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/Config.java b/src/main/java/org/redisson/Config.java index 28e697915..b85c1d4ff 100644 --- a/src/main/java/org/redisson/Config.java +++ b/src/main/java/org/redisson/Config.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/ConfigSupport.java b/src/main/java/org/redisson/ConfigSupport.java index cd634b1d9..3b27f2c7a 100644 --- a/src/main/java/org/redisson/ConfigSupport.java +++ b/src/main/java/org/redisson/ConfigSupport.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/ElasticacheServersConfig.java b/src/main/java/org/redisson/ElasticacheServersConfig.java index c1abcb222..593f1a3bb 100644 --- a/src/main/java/org/redisson/ElasticacheServersConfig.java +++ b/src/main/java/org/redisson/ElasticacheServersConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/EvictionScheduler.java b/src/main/java/org/redisson/EvictionScheduler.java index 245374cf6..f72d72cb3 100644 --- a/src/main/java/org/redisson/EvictionScheduler.java +++ b/src/main/java/org/redisson/EvictionScheduler.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,8 +93,8 @@ public class EvictionScheduler { // prevDelay = Math.max(minDelay, prevDelay/2); // } - if (sizeHistory.peekFirst() == sizeHistory.peekLast() - && sizeHistory.peekLast() == size) { + if (sizeHistory.peekFirst().intValue() == sizeHistory.peekLast() + && sizeHistory.peekLast().intValue() == size) { if (size == keysLimit) { delay = Math.max(minDelay, delay/4); } diff --git a/src/main/java/org/redisson/MasterSlaveServersConfig.java b/src/main/java/org/redisson/MasterSlaveServersConfig.java index d7a203211..e82f388dc 100644 --- a/src/main/java/org/redisson/MasterSlaveServersConfig.java +++ b/src/main/java/org/redisson/MasterSlaveServersConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/PubSubEntry.java b/src/main/java/org/redisson/PubSubEntry.java index e79008eb9..5685d2a3d 100644 --- a/src/main/java/org/redisson/PubSubEntry.java +++ b/src/main/java/org/redisson/PubSubEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/PubSubMessageListener.java b/src/main/java/org/redisson/PubSubMessageListener.java index 0e7147468..44a9d330e 100644 --- a/src/main/java/org/redisson/PubSubMessageListener.java +++ b/src/main/java/org/redisson/PubSubMessageListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/PubSubPatternMessageListener.java b/src/main/java/org/redisson/PubSubPatternMessageListener.java index 16096d424..b91f5a1bc 100644 --- a/src/main/java/org/redisson/PubSubPatternMessageListener.java +++ b/src/main/java/org/redisson/PubSubPatternMessageListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/PubSubPatternStatusListener.java b/src/main/java/org/redisson/PubSubPatternStatusListener.java index a3f186425..3f767632f 100644 --- a/src/main/java/org/redisson/PubSubPatternStatusListener.java +++ b/src/main/java/org/redisson/PubSubPatternStatusListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/PubSubStatusListener.java b/src/main/java/org/redisson/PubSubStatusListener.java index da81ea008..8438af66d 100644 --- a/src/main/java/org/redisson/PubSubStatusListener.java +++ b/src/main/java/org/redisson/PubSubStatusListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/ReadMode.java b/src/main/java/org/redisson/ReadMode.java index 543c46032..a9f108b37 100644 --- a/src/main/java/org/redisson/ReadMode.java +++ b/src/main/java/org/redisson/ReadMode.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedisClientResult.java b/src/main/java/org/redisson/RedisClientResult.java index c038fe7fb..48e9a6fa0 100644 --- a/src/main/java/org/redisson/RedisClientResult.java +++ b/src/main/java/org/redisson/RedisClientResult.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedisNodes.java b/src/main/java/org/redisson/RedisNodes.java index 4c79e13e8..f2d203d7f 100644 --- a/src/main/java/org/redisson/RedisNodes.java +++ b/src/main/java/org/redisson/RedisNodes.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/Redisson.java b/src/main/java/org/redisson/Redisson.java index b1b2dda36..051d3ae4c 100755 --- a/src/main/java/org/redisson/Redisson.java +++ b/src/main/java/org/redisson/Redisson.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonAtomicDouble.java b/src/main/java/org/redisson/RedissonAtomicDouble.java index 3d2ab73eb..ba6d4c9a5 100644 --- a/src/main/java/org/redisson/RedissonAtomicDouble.java +++ b/src/main/java/org/redisson/RedissonAtomicDouble.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonAtomicLong.java b/src/main/java/org/redisson/RedissonAtomicLong.java index 07bd7001f..4d9a3b8bf 100644 --- a/src/main/java/org/redisson/RedissonAtomicLong.java +++ b/src/main/java/org/redisson/RedissonAtomicLong.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBaseIterator.java b/src/main/java/org/redisson/RedissonBaseIterator.java index efb169cc0..0f85a46d9 100644 --- a/src/main/java/org/redisson/RedissonBaseIterator.java +++ b/src/main/java/org/redisson/RedissonBaseIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBaseMapIterator.java b/src/main/java/org/redisson/RedissonBaseMapIterator.java index 536887ff9..c64db7ece 100644 --- a/src/main/java/org/redisson/RedissonBaseMapIterator.java +++ b/src/main/java/org/redisson/RedissonBaseMapIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBatch.java b/src/main/java/org/redisson/RedissonBatch.java index 84ff7b75f..bbf980472 100644 --- a/src/main/java/org/redisson/RedissonBatch.java +++ b/src/main/java/org/redisson/RedissonBatch.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBitSet.java b/src/main/java/org/redisson/RedissonBitSet.java index 2f2310ba8..e8bdf6db8 100644 --- a/src/main/java/org/redisson/RedissonBitSet.java +++ b/src/main/java/org/redisson/RedissonBitSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBlockingDeque.java b/src/main/java/org/redisson/RedissonBlockingDeque.java index 315868607..c3c8e4505 100644 --- a/src/main/java/org/redisson/RedissonBlockingDeque.java +++ b/src/main/java/org/redisson/RedissonBlockingDeque.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBlockingQueue.java b/src/main/java/org/redisson/RedissonBlockingQueue.java index cd831df7a..ac7aab016 100644 --- a/src/main/java/org/redisson/RedissonBlockingQueue.java +++ b/src/main/java/org/redisson/RedissonBlockingQueue.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBloomFilter.java b/src/main/java/org/redisson/RedissonBloomFilter.java index 06fb7b6db..04b53727c 100644 --- a/src/main/java/org/redisson/RedissonBloomFilter.java +++ b/src/main/java/org/redisson/RedissonBloomFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBucket.java b/src/main/java/org/redisson/RedissonBucket.java index 7831848f7..f653f23a9 100644 --- a/src/main/java/org/redisson/RedissonBucket.java +++ b/src/main/java/org/redisson/RedissonBucket.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonBuckets.java b/src/main/java/org/redisson/RedissonBuckets.java index e9958461c..18a9ceea3 100644 --- a/src/main/java/org/redisson/RedissonBuckets.java +++ b/src/main/java/org/redisson/RedissonBuckets.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonClient.java b/src/main/java/org/redisson/RedissonClient.java index 6412ede3b..b3465bf1a 100755 --- a/src/main/java/org/redisson/RedissonClient.java +++ b/src/main/java/org/redisson/RedissonClient.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonCountDownLatch.java b/src/main/java/org/redisson/RedissonCountDownLatch.java index 5a4d660a6..1b4e49d45 100644 --- a/src/main/java/org/redisson/RedissonCountDownLatch.java +++ b/src/main/java/org/redisson/RedissonCountDownLatch.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonCountDownLatchEntry.java b/src/main/java/org/redisson/RedissonCountDownLatchEntry.java index 3f6197098..2e16d115f 100644 --- a/src/main/java/org/redisson/RedissonCountDownLatchEntry.java +++ b/src/main/java/org/redisson/RedissonCountDownLatchEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonDeque.java b/src/main/java/org/redisson/RedissonDeque.java index 04226c2ea..05e8ff018 100644 --- a/src/main/java/org/redisson/RedissonDeque.java +++ b/src/main/java/org/redisson/RedissonDeque.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonExpirable.java b/src/main/java/org/redisson/RedissonExpirable.java index 87a3d4b37..b13c3ee04 100644 --- a/src/main/java/org/redisson/RedissonExpirable.java +++ b/src/main/java/org/redisson/RedissonExpirable.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonFairLock.java b/src/main/java/org/redisson/RedissonFairLock.java index 8ec0f3f55..1dcb36146 100644 --- a/src/main/java/org/redisson/RedissonFairLock.java +++ b/src/main/java/org/redisson/RedissonFairLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,11 +61,13 @@ public class RedissonFairLock extends RedissonLock implements RLock { return PUBSUB.getEntry(getEntryName() + ":" + threadId); } + @Override protected Future subscribe(long threadId) { return PUBSUB.subscribe(getEntryName() + ":" + threadId, getChannelName() + ":" + getLockName(threadId), commandExecutor.getConnectionManager()); } + @Override protected void unsubscribe(Future future, long threadId) { PUBSUB.unsubscribe(future.getNow(), getEntryName() + ":" + threadId, getChannelName() + ":" + getLockName(threadId), commandExecutor.getConnectionManager()); @@ -212,7 +214,7 @@ public class RedissonFairLock extends RedissonLock implements RLock { } @Override - Future forceUnlockAsync() { + public Future forceUnlockAsync() { cancelExpirationRenewal(); return commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, // remove stale threads diff --git a/src/main/java/org/redisson/RedissonGeo.java b/src/main/java/org/redisson/RedissonGeo.java index 20ca9a3d1..f1b71ab66 100644 --- a/src/main/java/org/redisson/RedissonGeo.java +++ b/src/main/java/org/redisson/RedissonGeo.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonHyperLogLog.java b/src/main/java/org/redisson/RedissonHyperLogLog.java index ea018723a..9d856daf8 100644 --- a/src/main/java/org/redisson/RedissonHyperLogLog.java +++ b/src/main/java/org/redisson/RedissonHyperLogLog.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonKeys.java b/src/main/java/org/redisson/RedissonKeys.java index ec44328bf..d208533b5 100644 --- a/src/main/java/org/redisson/RedissonKeys.java +++ b/src/main/java/org/redisson/RedissonKeys.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonLexSortedSet.java b/src/main/java/org/redisson/RedissonLexSortedSet.java index 35eb8c17a..d6f731dbf 100644 --- a/src/main/java/org/redisson/RedissonLexSortedSet.java +++ b/src/main/java/org/redisson/RedissonLexSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonList.java b/src/main/java/org/redisson/RedissonList.java index 78083113e..a41400d28 100644 --- a/src/main/java/org/redisson/RedissonList.java +++ b/src/main/java/org/redisson/RedissonList.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonListMultimap.java b/src/main/java/org/redisson/RedissonListMultimap.java index 5fd88ac8e..1c3071d4b 100644 --- a/src/main/java/org/redisson/RedissonListMultimap.java +++ b/src/main/java/org/redisson/RedissonListMultimap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonListMultimapCache.java b/src/main/java/org/redisson/RedissonListMultimapCache.java index 828ff6e14..dce5239fa 100644 --- a/src/main/java/org/redisson/RedissonListMultimapCache.java +++ b/src/main/java/org/redisson/RedissonListMultimapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonListMultimapIterator.java b/src/main/java/org/redisson/RedissonListMultimapIterator.java index bb738d786..212b5368b 100644 --- a/src/main/java/org/redisson/RedissonListMultimapIterator.java +++ b/src/main/java/org/redisson/RedissonListMultimapIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonListMultimapValues.java b/src/main/java/org/redisson/RedissonListMultimapValues.java index 3e40b3308..f705d31ac 100644 --- a/src/main/java/org/redisson/RedissonListMultimapValues.java +++ b/src/main/java/org/redisson/RedissonListMultimapValues.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonLock.java b/src/main/java/org/redisson/RedissonLock.java index d789ce821..f98173d44 100644 --- a/src/main/java/org/redisson/RedissonLock.java +++ b/src/main/java/org/redisson/RedissonLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -371,7 +371,8 @@ public class RedissonLock extends RedissonExpirable implements RLock { get(forceUnlockAsync()); } - Future forceUnlockAsync() { + @Override + public Future forceUnlockAsync() { cancelExpirationRenewal(); return commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if (redis.call('del', KEYS[1]) == 1) then " diff --git a/src/main/java/org/redisson/RedissonLockEntry.java b/src/main/java/org/redisson/RedissonLockEntry.java index af61948cf..0535dd2d5 100644 --- a/src/main/java/org/redisson/RedissonLockEntry.java +++ b/src/main/java/org/redisson/RedissonLockEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMap.java b/src/main/java/org/redisson/RedissonMap.java index 0480dc52f..0ae2cdd53 100644 --- a/src/main/java/org/redisson/RedissonMap.java +++ b/src/main/java/org/redisson/RedissonMap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMapCache.java b/src/main/java/org/redisson/RedissonMapCache.java index 5cb409ef0..de245c434 100644 --- a/src/main/java/org/redisson/RedissonMapCache.java +++ b/src/main/java/org/redisson/RedissonMapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -703,7 +703,7 @@ public class RedissonMapCache extends RedissonMap implements RMapCac @Override public Future deleteAsync() { - return commandExecutor.writeAsync(getName(), RedisCommands.DEL_OBJECTS, getName(), getTimeoutSetName()); + return commandExecutor.writeAsync(getName(), RedisCommands.DEL_OBJECTS, getName(), getTimeoutSetName(), getIdleSetName()); } @Override diff --git a/src/main/java/org/redisson/RedissonMapEntry.java b/src/main/java/org/redisson/RedissonMapEntry.java index 72124974f..be73bff93 100644 --- a/src/main/java/org/redisson/RedissonMapEntry.java +++ b/src/main/java/org/redisson/RedissonMapEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMapIterator.java b/src/main/java/org/redisson/RedissonMapIterator.java index 5b3c84326..63415cdec 100644 --- a/src/main/java/org/redisson/RedissonMapIterator.java +++ b/src/main/java/org/redisson/RedissonMapIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMultiMapIterator.java b/src/main/java/org/redisson/RedissonMultiMapIterator.java index a3cdc4312..c0a947614 100644 --- a/src/main/java/org/redisson/RedissonMultiMapIterator.java +++ b/src/main/java/org/redisson/RedissonMultiMapIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMultiMapKeysIterator.java b/src/main/java/org/redisson/RedissonMultiMapKeysIterator.java index 375349e95..53f714a3c 100644 --- a/src/main/java/org/redisson/RedissonMultiMapKeysIterator.java +++ b/src/main/java/org/redisson/RedissonMultiMapKeysIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMultimap.java b/src/main/java/org/redisson/RedissonMultimap.java index 0d02efcf0..9a8fbedb5 100644 --- a/src/main/java/org/redisson/RedissonMultimap.java +++ b/src/main/java/org/redisson/RedissonMultimap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonMultimapCache.java b/src/main/java/org/redisson/RedissonMultimapCache.java index 765ab8021..831f0ab53 100644 --- a/src/main/java/org/redisson/RedissonMultimapCache.java +++ b/src/main/java/org/redisson/RedissonMultimapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonObject.java b/src/main/java/org/redisson/RedissonObject.java index c614fae5d..63bcf5ff6 100644 --- a/src/main/java/org/redisson/RedissonObject.java +++ b/src/main/java/org/redisson/RedissonObject.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonPatternTopic.java b/src/main/java/org/redisson/RedissonPatternTopic.java index 35c8fe1d2..b3dd2f9b5 100644 --- a/src/main/java/org/redisson/RedissonPatternTopic.java +++ b/src/main/java/org/redisson/RedissonPatternTopic.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonQueue.java b/src/main/java/org/redisson/RedissonQueue.java index ea1f62110..ec6951087 100644 --- a/src/main/java/org/redisson/RedissonQueue.java +++ b/src/main/java/org/redisson/RedissonQueue.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonReactive.java b/src/main/java/org/redisson/RedissonReactive.java index 398e64cfa..d9128b3e8 100644 --- a/src/main/java/org/redisson/RedissonReactive.java +++ b/src/main/java/org/redisson/RedissonReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonReadLock.java b/src/main/java/org/redisson/RedissonReadLock.java index f986b154f..8643e55f9 100644 --- a/src/main/java/org/redisson/RedissonReadLock.java +++ b/src/main/java/org/redisson/RedissonReadLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -115,7 +115,8 @@ public class RedissonReadLock extends RedissonLock implements RLock { throw new UnsupportedOperationException(); } - Future forceUnlockAsync() { + @Override + public Future forceUnlockAsync() { Future result = commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if (redis.call('hget', KEYS[1], 'mode') == 'read') then " + "redis.call('del', KEYS[1]); " + diff --git a/src/main/java/org/redisson/RedissonReadWriteLock.java b/src/main/java/org/redisson/RedissonReadWriteLock.java index 78aac273a..2e00538b8 100644 --- a/src/main/java/org/redisson/RedissonReadWriteLock.java +++ b/src/main/java/org/redisson/RedissonReadWriteLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonRemoteService.java b/src/main/java/org/redisson/RedissonRemoteService.java index 337b03dca..b156f5a5b 100644 --- a/src/main/java/org/redisson/RedissonRemoteService.java +++ b/src/main/java/org/redisson/RedissonRemoteService.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonScoredSortedSet.java b/src/main/java/org/redisson/RedissonScoredSortedSet.java index 042c44ebf..459e72224 100644 --- a/src/main/java/org/redisson/RedissonScoredSortedSet.java +++ b/src/main/java/org/redisson/RedissonScoredSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonScript.java b/src/main/java/org/redisson/RedissonScript.java index ba8c7d519..7746d445c 100644 --- a/src/main/java/org/redisson/RedissonScript.java +++ b/src/main/java/org/redisson/RedissonScript.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSemaphore.java b/src/main/java/org/redisson/RedissonSemaphore.java index 552d0ea48..6fce66b17 100644 --- a/src/main/java/org/redisson/RedissonSemaphore.java +++ b/src/main/java/org/redisson/RedissonSemaphore.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSet.java b/src/main/java/org/redisson/RedissonSet.java index 7303a68cc..d5a2787b7 100644 --- a/src/main/java/org/redisson/RedissonSet.java +++ b/src/main/java/org/redisson/RedissonSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSetCache.java b/src/main/java/org/redisson/RedissonSetCache.java index 3704be77a..09a25ebdc 100644 --- a/src/main/java/org/redisson/RedissonSetCache.java +++ b/src/main/java/org/redisson/RedissonSetCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSetMultimap.java b/src/main/java/org/redisson/RedissonSetMultimap.java index 74ee7a333..ff184f748 100644 --- a/src/main/java/org/redisson/RedissonSetMultimap.java +++ b/src/main/java/org/redisson/RedissonSetMultimap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSetMultimapCache.java b/src/main/java/org/redisson/RedissonSetMultimapCache.java index 4254d3ed6..80f6dbafe 100644 --- a/src/main/java/org/redisson/RedissonSetMultimapCache.java +++ b/src/main/java/org/redisson/RedissonSetMultimapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSetMultimapIterator.java b/src/main/java/org/redisson/RedissonSetMultimapIterator.java index 2cf57b0a4..6045bf46f 100644 --- a/src/main/java/org/redisson/RedissonSetMultimapIterator.java +++ b/src/main/java/org/redisson/RedissonSetMultimapIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSetMultimapValues.java b/src/main/java/org/redisson/RedissonSetMultimapValues.java index 629cbd111..89ede9133 100644 --- a/src/main/java/org/redisson/RedissonSetMultimapValues.java +++ b/src/main/java/org/redisson/RedissonSetMultimapValues.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonShutdownException.java b/src/main/java/org/redisson/RedissonShutdownException.java index ddfcb1aa1..f471aa3f3 100644 --- a/src/main/java/org/redisson/RedissonShutdownException.java +++ b/src/main/java/org/redisson/RedissonShutdownException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSortedSet.java b/src/main/java/org/redisson/RedissonSortedSet.java index 8f1b3edb3..77f273022 100644 --- a/src/main/java/org/redisson/RedissonSortedSet.java +++ b/src/main/java/org/redisson/RedissonSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSubList.java b/src/main/java/org/redisson/RedissonSubList.java index 4e474bb7d..2bc5c9d11 100644 --- a/src/main/java/org/redisson/RedissonSubList.java +++ b/src/main/java/org/redisson/RedissonSubList.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonSubSortedSet.java b/src/main/java/org/redisson/RedissonSubSortedSet.java index 13bfb8050..80e45d6d7 100644 --- a/src/main/java/org/redisson/RedissonSubSortedSet.java +++ b/src/main/java/org/redisson/RedissonSubSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonTopic.java b/src/main/java/org/redisson/RedissonTopic.java index 807f95e6a..2d5b0fbe8 100644 --- a/src/main/java/org/redisson/RedissonTopic.java +++ b/src/main/java/org/redisson/RedissonTopic.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/RedissonWriteLock.java b/src/main/java/org/redisson/RedissonWriteLock.java index ed5e9f9ec..2bbafeb22 100644 --- a/src/main/java/org/redisson/RedissonWriteLock.java +++ b/src/main/java/org/redisson/RedissonWriteLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,7 +117,8 @@ public class RedissonWriteLock extends RedissonLock implements RLock { throw new UnsupportedOperationException(); } - Future forceUnlockAsync() { + @Override + public Future forceUnlockAsync() { Future result = commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if (redis.call('hget', KEYS[1], 'mode') == 'write') then " + "redis.call('del', KEYS[1]); " + diff --git a/src/main/java/org/redisson/SentinelServersConfig.java b/src/main/java/org/redisson/SentinelServersConfig.java index 6d92e12f7..0897a09fa 100644 --- a/src/main/java/org/redisson/SentinelServersConfig.java +++ b/src/main/java/org/redisson/SentinelServersConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/SingleServerConfig.java b/src/main/java/org/redisson/SingleServerConfig.java index 7c258f204..876f0d042 100644 --- a/src/main/java/org/redisson/SingleServerConfig.java +++ b/src/main/java/org/redisson/SingleServerConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/SlotCallback.java b/src/main/java/org/redisson/SlotCallback.java index 05ba59dfc..90a8d5c8a 100644 --- a/src/main/java/org/redisson/SlotCallback.java +++ b/src/main/java/org/redisson/SlotCallback.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/Version.java b/src/main/java/org/redisson/Version.java index 861f25b75..2f25db424 100644 --- a/src/main/java/org/redisson/Version.java +++ b/src/main/java/org/redisson/Version.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RAtomicLongReactive.java b/src/main/java/org/redisson/api/RAtomicLongReactive.java index 12580d068..4bd448439 100644 --- a/src/main/java/org/redisson/api/RAtomicLongReactive.java +++ b/src/main/java/org/redisson/api/RAtomicLongReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RBatchReactive.java b/src/main/java/org/redisson/api/RBatchReactive.java index 2ad4d1cd1..2cd0e3594 100644 --- a/src/main/java/org/redisson/api/RBatchReactive.java +++ b/src/main/java/org/redisson/api/RBatchReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RBitSetReactive.java b/src/main/java/org/redisson/api/RBitSetReactive.java index ea0caadb4..bde2c7106 100644 --- a/src/main/java/org/redisson/api/RBitSetReactive.java +++ b/src/main/java/org/redisson/api/RBitSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RBlockingQueueReactive.java b/src/main/java/org/redisson/api/RBlockingQueueReactive.java index f04813b17..61f7a2757 100644 --- a/src/main/java/org/redisson/api/RBlockingQueueReactive.java +++ b/src/main/java/org/redisson/api/RBlockingQueueReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RBucketReactive.java b/src/main/java/org/redisson/api/RBucketReactive.java index 04583dab3..4766d293a 100644 --- a/src/main/java/org/redisson/api/RBucketReactive.java +++ b/src/main/java/org/redisson/api/RBucketReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RCollectionReactive.java b/src/main/java/org/redisson/api/RCollectionReactive.java index bf1f49c57..becd2b95d 100644 --- a/src/main/java/org/redisson/api/RCollectionReactive.java +++ b/src/main/java/org/redisson/api/RCollectionReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RDequeReactive.java b/src/main/java/org/redisson/api/RDequeReactive.java index fc16fa89c..d73b5a831 100644 --- a/src/main/java/org/redisson/api/RDequeReactive.java +++ b/src/main/java/org/redisson/api/RDequeReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RExpirableReactive.java b/src/main/java/org/redisson/api/RExpirableReactive.java index 5c6e4c25c..d07f868a7 100644 --- a/src/main/java/org/redisson/api/RExpirableReactive.java +++ b/src/main/java/org/redisson/api/RExpirableReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RHyperLogLogReactive.java b/src/main/java/org/redisson/api/RHyperLogLogReactive.java index 9f0fe3efc..c32048b43 100644 --- a/src/main/java/org/redisson/api/RHyperLogLogReactive.java +++ b/src/main/java/org/redisson/api/RHyperLogLogReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RKeysReactive.java b/src/main/java/org/redisson/api/RKeysReactive.java index 1d60a8867..e48c19eba 100644 --- a/src/main/java/org/redisson/api/RKeysReactive.java +++ b/src/main/java/org/redisson/api/RKeysReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RLexSortedSetReactive.java b/src/main/java/org/redisson/api/RLexSortedSetReactive.java index c738a0b15..7ec748864 100644 --- a/src/main/java/org/redisson/api/RLexSortedSetReactive.java +++ b/src/main/java/org/redisson/api/RLexSortedSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RListReactive.java b/src/main/java/org/redisson/api/RListReactive.java index 6c2536f52..857215b70 100644 --- a/src/main/java/org/redisson/api/RListReactive.java +++ b/src/main/java/org/redisson/api/RListReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RMapCacheReactive.java b/src/main/java/org/redisson/api/RMapCacheReactive.java index 6efc85273..751e05872 100644 --- a/src/main/java/org/redisson/api/RMapCacheReactive.java +++ b/src/main/java/org/redisson/api/RMapCacheReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RMapReactive.java b/src/main/java/org/redisson/api/RMapReactive.java index ed1fcddc6..df1b2e85c 100644 --- a/src/main/java/org/redisson/api/RMapReactive.java +++ b/src/main/java/org/redisson/api/RMapReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RObjectReactive.java b/src/main/java/org/redisson/api/RObjectReactive.java index 0d9da22f9..d11bfe0dc 100644 --- a/src/main/java/org/redisson/api/RObjectReactive.java +++ b/src/main/java/org/redisson/api/RObjectReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RPatternTopicReactive.java b/src/main/java/org/redisson/api/RPatternTopicReactive.java index 09aa97af9..cc8564eb9 100644 --- a/src/main/java/org/redisson/api/RPatternTopicReactive.java +++ b/src/main/java/org/redisson/api/RPatternTopicReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RQueueReactive.java b/src/main/java/org/redisson/api/RQueueReactive.java index 32a497085..49accc7b2 100644 --- a/src/main/java/org/redisson/api/RQueueReactive.java +++ b/src/main/java/org/redisson/api/RQueueReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RScoredSortedSetReactive.java b/src/main/java/org/redisson/api/RScoredSortedSetReactive.java index 9ca7bff38..a8a7fd7dd 100644 --- a/src/main/java/org/redisson/api/RScoredSortedSetReactive.java +++ b/src/main/java/org/redisson/api/RScoredSortedSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RScriptReactive.java b/src/main/java/org/redisson/api/RScriptReactive.java index 211049999..6bc589513 100644 --- a/src/main/java/org/redisson/api/RScriptReactive.java +++ b/src/main/java/org/redisson/api/RScriptReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RSetCacheReactive.java b/src/main/java/org/redisson/api/RSetCacheReactive.java index bc05f8fa1..77be964d4 100644 --- a/src/main/java/org/redisson/api/RSetCacheReactive.java +++ b/src/main/java/org/redisson/api/RSetCacheReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RSetReactive.java b/src/main/java/org/redisson/api/RSetReactive.java index 392c4b33e..e5d1c6f53 100644 --- a/src/main/java/org/redisson/api/RSetReactive.java +++ b/src/main/java/org/redisson/api/RSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RTopicReactive.java b/src/main/java/org/redisson/api/RTopicReactive.java index e15d3bc88..36696b90a 100644 --- a/src/main/java/org/redisson/api/RTopicReactive.java +++ b/src/main/java/org/redisson/api/RTopicReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/api/RedissonReactiveClient.java b/src/main/java/org/redisson/api/RedissonReactiveClient.java index 19400d282..a722cc5a5 100644 --- a/src/main/java/org/redisson/api/RedissonReactiveClient.java +++ b/src/main/java/org/redisson/api/RedissonReactiveClient.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/BaseRedisPubSubListener.java b/src/main/java/org/redisson/client/BaseRedisPubSubListener.java index 313c5d23a..5ed3cdf0f 100644 --- a/src/main/java/org/redisson/client/BaseRedisPubSubListener.java +++ b/src/main/java/org/redisson/client/BaseRedisPubSubListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/OneShotPubSubListener.java b/src/main/java/org/redisson/client/OneShotPubSubListener.java index 34253755e..b6528e47d 100644 --- a/src/main/java/org/redisson/client/OneShotPubSubListener.java +++ b/src/main/java/org/redisson/client/OneShotPubSubListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/ReconnectListener.java b/src/main/java/org/redisson/client/ReconnectListener.java index 9a7a0d1ba..9248dfe08 100644 --- a/src/main/java/org/redisson/client/ReconnectListener.java +++ b/src/main/java/org/redisson/client/ReconnectListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisAskException.java b/src/main/java/org/redisson/client/RedisAskException.java index 3cdf2fa44..57dbcc91f 100644 --- a/src/main/java/org/redisson/client/RedisAskException.java +++ b/src/main/java/org/redisson/client/RedisAskException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisClient.java b/src/main/java/org/redisson/client/RedisClient.java index b22ac2512..011d7c529 100644 --- a/src/main/java/org/redisson/client/RedisClient.java +++ b/src/main/java/org/redisson/client/RedisClient.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package org.redisson.client; import java.net.InetSocketAddress; +import java.net.URI; import org.redisson.client.handler.CommandDecoder; import org.redisson.client.handler.CommandEncoder; @@ -43,6 +44,7 @@ import io.netty.util.concurrent.ImmediateEventExecutor; import io.netty.util.concurrent.Promise; import java.util.Map; import org.redisson.client.protocol.RedisCommands; +import org.redisson.misc.URIBuilder; public class RedisClient { @@ -53,10 +55,27 @@ public class RedisClient { private final long timeout; private boolean hasOwnGroup; + public RedisClient(String address) { + this(URIBuilder.create(address)); + } + + public RedisClient(URI address) { + this(new NioEventLoopGroup(), address); + hasOwnGroup = true; + } + + public RedisClient(EventLoopGroup group, URI address) { + this(group, address.getHost(), address.getPort()); + } + public RedisClient(String host, int port) { this(new NioEventLoopGroup(), NioSocketChannel.class, host, port, 60 * 1000); hasOwnGroup = true; } + + public RedisClient(EventLoopGroup group, String host, int port) { + this(group, NioSocketChannel.class, host, port, 60 * 1000); + } public RedisClient(EventLoopGroup group, Class socketChannelClass, String host, int port, int timeout) { addr = new InetSocketAddress(host, port); @@ -150,6 +169,9 @@ public class RedisClient { } public ChannelGroupFuture shutdownAsync() { + for (Channel channel : channels) { + RedisConnection.getFrom(channel).setClosed(true); + } return channels.close(); } diff --git a/src/main/java/org/redisson/client/RedisConnection.java b/src/main/java/org/redisson/client/RedisConnection.java index 72158ff59..df79fda72 100644 --- a/src/main/java/org/redisson/client/RedisConnection.java +++ b/src/main/java/org/redisson/client/RedisConnection.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisConnectionException.java b/src/main/java/org/redisson/client/RedisConnectionException.java index d01c011cb..651e9543d 100644 --- a/src/main/java/org/redisson/client/RedisConnectionException.java +++ b/src/main/java/org/redisson/client/RedisConnectionException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisException.java b/src/main/java/org/redisson/client/RedisException.java index a3e6a64d2..7aedefbcd 100644 --- a/src/main/java/org/redisson/client/RedisException.java +++ b/src/main/java/org/redisson/client/RedisException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisLoadingException.java b/src/main/java/org/redisson/client/RedisLoadingException.java index d8b0603af..db5e341e7 100644 --- a/src/main/java/org/redisson/client/RedisLoadingException.java +++ b/src/main/java/org/redisson/client/RedisLoadingException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisMovedException.java b/src/main/java/org/redisson/client/RedisMovedException.java index 1581e931d..5fe893f22 100644 --- a/src/main/java/org/redisson/client/RedisMovedException.java +++ b/src/main/java/org/redisson/client/RedisMovedException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisNodeNotFoundException.java b/src/main/java/org/redisson/client/RedisNodeNotFoundException.java index 042e167c2..7e53541aa 100644 --- a/src/main/java/org/redisson/client/RedisNodeNotFoundException.java +++ b/src/main/java/org/redisson/client/RedisNodeNotFoundException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisOutOfMemoryException.java b/src/main/java/org/redisson/client/RedisOutOfMemoryException.java index bb1036b24..1562c9277 100644 --- a/src/main/java/org/redisson/client/RedisOutOfMemoryException.java +++ b/src/main/java/org/redisson/client/RedisOutOfMemoryException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisPubSubConnection.java b/src/main/java/org/redisson/client/RedisPubSubConnection.java index a0dfb2839..31349a67e 100644 --- a/src/main/java/org/redisson/client/RedisPubSubConnection.java +++ b/src/main/java/org/redisson/client/RedisPubSubConnection.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisPubSubListener.java b/src/main/java/org/redisson/client/RedisPubSubListener.java index 50ecf0f3e..8d1b7c545 100644 --- a/src/main/java/org/redisson/client/RedisPubSubListener.java +++ b/src/main/java/org/redisson/client/RedisPubSubListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisRedirectException.java b/src/main/java/org/redisson/client/RedisRedirectException.java index 9c15b87e5..93633b98a 100644 --- a/src/main/java/org/redisson/client/RedisRedirectException.java +++ b/src/main/java/org/redisson/client/RedisRedirectException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/RedisTimeoutException.java b/src/main/java/org/redisson/client/RedisTimeoutException.java index f91f446cb..fe950c59a 100644 --- a/src/main/java/org/redisson/client/RedisTimeoutException.java +++ b/src/main/java/org/redisson/client/RedisTimeoutException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/SubscribeListener.java b/src/main/java/org/redisson/client/SubscribeListener.java index 185905b45..0e399f930 100644 --- a/src/main/java/org/redisson/client/SubscribeListener.java +++ b/src/main/java/org/redisson/client/SubscribeListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/WriteRedisConnectionException.java b/src/main/java/org/redisson/client/WriteRedisConnectionException.java index d95fa09ed..8b6b53367 100644 --- a/src/main/java/org/redisson/client/WriteRedisConnectionException.java +++ b/src/main/java/org/redisson/client/WriteRedisConnectionException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/BitSetCodec.java b/src/main/java/org/redisson/client/codec/BitSetCodec.java index 3423530fe..356472a70 100644 --- a/src/main/java/org/redisson/client/codec/BitSetCodec.java +++ b/src/main/java/org/redisson/client/codec/BitSetCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/ByteArrayCodec.java b/src/main/java/org/redisson/client/codec/ByteArrayCodec.java index db7568306..b6057aca5 100644 --- a/src/main/java/org/redisson/client/codec/ByteArrayCodec.java +++ b/src/main/java/org/redisson/client/codec/ByteArrayCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/Codec.java b/src/main/java/org/redisson/client/codec/Codec.java index 5b6d23ba1..cfb90d08c 100644 --- a/src/main/java/org/redisson/client/codec/Codec.java +++ b/src/main/java/org/redisson/client/codec/Codec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/DelegateDecoderCodec.java b/src/main/java/org/redisson/client/codec/DelegateDecoderCodec.java index 407cc5b93..a6cc06f9d 100644 --- a/src/main/java/org/redisson/client/codec/DelegateDecoderCodec.java +++ b/src/main/java/org/redisson/client/codec/DelegateDecoderCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/DoubleCodec.java b/src/main/java/org/redisson/client/codec/DoubleCodec.java index 0e29f5c7b..7255348f2 100644 --- a/src/main/java/org/redisson/client/codec/DoubleCodec.java +++ b/src/main/java/org/redisson/client/codec/DoubleCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/GeoEntryCodec.java b/src/main/java/org/redisson/client/codec/GeoEntryCodec.java index 71a985948..dbb44cce5 100644 --- a/src/main/java/org/redisson/client/codec/GeoEntryCodec.java +++ b/src/main/java/org/redisson/client/codec/GeoEntryCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/IntegerCodec.java b/src/main/java/org/redisson/client/codec/IntegerCodec.java index 0baabd72a..d0a6beedc 100644 --- a/src/main/java/org/redisson/client/codec/IntegerCodec.java +++ b/src/main/java/org/redisson/client/codec/IntegerCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/LongCodec.java b/src/main/java/org/redisson/client/codec/LongCodec.java index 480995ec3..7da934bfd 100644 --- a/src/main/java/org/redisson/client/codec/LongCodec.java +++ b/src/main/java/org/redisson/client/codec/LongCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/ScanCodec.java b/src/main/java/org/redisson/client/codec/ScanCodec.java index ec361d080..ac760c0bb 100644 --- a/src/main/java/org/redisson/client/codec/ScanCodec.java +++ b/src/main/java/org/redisson/client/codec/ScanCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/ScoredCodec.java b/src/main/java/org/redisson/client/codec/ScoredCodec.java index f4bf3656e..660282681 100644 --- a/src/main/java/org/redisson/client/codec/ScoredCodec.java +++ b/src/main/java/org/redisson/client/codec/ScoredCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/codec/StringCodec.java b/src/main/java/org/redisson/client/codec/StringCodec.java index f49e19aaa..8fcb84293 100644 --- a/src/main/java/org/redisson/client/codec/StringCodec.java +++ b/src/main/java/org/redisson/client/codec/StringCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/CommandBatchEncoder.java b/src/main/java/org/redisson/client/handler/CommandBatchEncoder.java index 9412b5ab4..6986545e2 100644 --- a/src/main/java/org/redisson/client/handler/CommandBatchEncoder.java +++ b/src/main/java/org/redisson/client/handler/CommandBatchEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/CommandDecoder.java b/src/main/java/org/redisson/client/handler/CommandDecoder.java index da0c1e6d7..676b42dd9 100644 --- a/src/main/java/org/redisson/client/handler/CommandDecoder.java +++ b/src/main/java/org/redisson/client/handler/CommandDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -210,39 +210,49 @@ public class CommandDecoder extends ReplayingDecoder { private void decode(ByteBuf in, CommandData data, List parts, Channel channel) throws IOException { int code = in.readByte(); if (code == '+') { - String result = in.readBytes(in.bytesBefore((byte) '\r')).toString(CharsetUtil.UTF_8); - in.skipBytes(2); - - handleResult(data, parts, result, false, channel); + ByteBuf rb = in.readBytes(in.bytesBefore((byte) '\r')); + try { + String result = rb.toString(CharsetUtil.UTF_8); + in.skipBytes(2); + + handleResult(data, parts, result, false, channel); + } finally { + rb.release(); + } } else if (code == '-') { - String error = in.readBytes(in.bytesBefore((byte) '\r')).toString(CharsetUtil.UTF_8); - in.skipBytes(2); - - if (error.startsWith("MOVED")) { - String[] errorParts = error.split(" "); - int slot = Integer.valueOf(errorParts[1]); - String addr = errorParts[2]; - data.tryFailure(new RedisMovedException(slot, addr)); - } else if (error.startsWith("ASK")) { - String[] errorParts = error.split(" "); - int slot = Integer.valueOf(errorParts[1]); - String addr = errorParts[2]; - data.tryFailure(new RedisAskException(slot, addr)); - } else if (error.startsWith("LOADING")) { - data.tryFailure(new RedisLoadingException(error - + ". channel: " + channel + " data: " + data)); - } else if (error.startsWith("OOM")) { - data.tryFailure(new RedisOutOfMemoryException(error.split("OOM ")[1] - + ". channel: " + channel + " data: " + data)); - } else if (error.contains("-OOM ")) { - data.tryFailure(new RedisOutOfMemoryException(error.split("-OOM ")[1] - + ". channel: " + channel + " data: " + data)); - } else { - if (data != null) { - data.tryFailure(new RedisException(error + ". channel: " + channel + " command: " + data)); + ByteBuf rb = in.readBytes(in.bytesBefore((byte) '\r')); + try { + String error = rb.toString(CharsetUtil.UTF_8); + in.skipBytes(2); + + if (error.startsWith("MOVED")) { + String[] errorParts = error.split(" "); + int slot = Integer.valueOf(errorParts[1]); + String addr = errorParts[2]; + data.tryFailure(new RedisMovedException(slot, addr)); + } else if (error.startsWith("ASK")) { + String[] errorParts = error.split(" "); + int slot = Integer.valueOf(errorParts[1]); + String addr = errorParts[2]; + data.tryFailure(new RedisAskException(slot, addr)); + } else if (error.startsWith("LOADING")) { + data.tryFailure(new RedisLoadingException(error + + ". channel: " + channel + " data: " + data)); + } else if (error.startsWith("OOM")) { + data.tryFailure(new RedisOutOfMemoryException(error.split("OOM ")[1] + + ". channel: " + channel + " data: " + data)); + } else if (error.contains("-OOM ")) { + data.tryFailure(new RedisOutOfMemoryException(error.split("-OOM ")[1] + + ". channel: " + channel + " data: " + data)); } else { - log.error("Error: {} channel: {} data: {}", error, channel, data); + if (data != null) { + data.tryFailure(new RedisException(error + ". channel: " + channel + " command: " + data)); + } else { + log.error("Error: {} channel: {} data: {}", error, channel, data); + } } + } finally { + rb.release(); } } else if (code == ':') { Long result = readLong(in); diff --git a/src/main/java/org/redisson/client/handler/CommandEncoder.java b/src/main/java/org/redisson/client/handler/CommandEncoder.java index 54bd57e52..18d9f05f0 100644 --- a/src/main/java/org/redisson/client/handler/CommandEncoder.java +++ b/src/main/java/org/redisson/client/handler/CommandEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/CommandsQueue.java b/src/main/java/org/redisson/client/handler/CommandsQueue.java index 96446c90e..4aa4efae2 100644 --- a/src/main/java/org/redisson/client/handler/CommandsQueue.java +++ b/src/main/java/org/redisson/client/handler/CommandsQueue.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/ConnectionWatchdog.java b/src/main/java/org/redisson/client/handler/ConnectionWatchdog.java index 54270890d..a3e51fca1 100644 --- a/src/main/java/org/redisson/client/handler/ConnectionWatchdog.java +++ b/src/main/java/org/redisson/client/handler/ConnectionWatchdog.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/PubSubKey.java b/src/main/java/org/redisson/client/handler/PubSubKey.java index cf5ddd89e..93b69c62a 100644 --- a/src/main/java/org/redisson/client/handler/PubSubKey.java +++ b/src/main/java/org/redisson/client/handler/PubSubKey.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/State.java b/src/main/java/org/redisson/client/handler/State.java index 0c8f35206..6fab0d7f3 100644 --- a/src/main/java/org/redisson/client/handler/State.java +++ b/src/main/java/org/redisson/client/handler/State.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/handler/StateLevel.java b/src/main/java/org/redisson/client/handler/StateLevel.java index 64b0d9186..710728dd8 100644 --- a/src/main/java/org/redisson/client/handler/StateLevel.java +++ b/src/main/java/org/redisson/client/handler/StateLevel.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/BatchCommandData.java b/src/main/java/org/redisson/client/protocol/BatchCommandData.java index 0d35a707e..e6b3e058a 100644 --- a/src/main/java/org/redisson/client/protocol/BatchCommandData.java +++ b/src/main/java/org/redisson/client/protocol/BatchCommandData.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/CommandData.java b/src/main/java/org/redisson/client/protocol/CommandData.java index 7cafdedab..92bd1763b 100644 --- a/src/main/java/org/redisson/client/protocol/CommandData.java +++ b/src/main/java/org/redisson/client/protocol/CommandData.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/CommandsData.java b/src/main/java/org/redisson/client/protocol/CommandsData.java index 7955bb6c6..85c07b116 100644 --- a/src/main/java/org/redisson/client/protocol/CommandsData.java +++ b/src/main/java/org/redisson/client/protocol/CommandsData.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/Decoder.java b/src/main/java/org/redisson/client/protocol/Decoder.java index 76e44d596..18a8aaf78 100644 --- a/src/main/java/org/redisson/client/protocol/Decoder.java +++ b/src/main/java/org/redisson/client/protocol/Decoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/DefaultParamsEncoder.java b/src/main/java/org/redisson/client/protocol/DefaultParamsEncoder.java index 394cbce12..6bcd42067 100644 --- a/src/main/java/org/redisson/client/protocol/DefaultParamsEncoder.java +++ b/src/main/java/org/redisson/client/protocol/DefaultParamsEncoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/Encoder.java b/src/main/java/org/redisson/client/protocol/Encoder.java index ed740ef6a..16844d841 100644 --- a/src/main/java/org/redisson/client/protocol/Encoder.java +++ b/src/main/java/org/redisson/client/protocol/Encoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/QueueCommand.java b/src/main/java/org/redisson/client/protocol/QueueCommand.java index 33582c982..aca015b01 100644 --- a/src/main/java/org/redisson/client/protocol/QueueCommand.java +++ b/src/main/java/org/redisson/client/protocol/QueueCommand.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/QueueCommandHolder.java b/src/main/java/org/redisson/client/protocol/QueueCommandHolder.java index ed8bbfab3..8895b1b1e 100644 --- a/src/main/java/org/redisson/client/protocol/QueueCommandHolder.java +++ b/src/main/java/org/redisson/client/protocol/QueueCommandHolder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/RedisCommand.java b/src/main/java/org/redisson/client/protocol/RedisCommand.java index 2ff072329..1d67de90e 100644 --- a/src/main/java/org/redisson/client/protocol/RedisCommand.java +++ b/src/main/java/org/redisson/client/protocol/RedisCommand.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/RedisCommands.java b/src/main/java/org/redisson/client/protocol/RedisCommands.java index 043c9a41b..ef28fb048 100644 --- a/src/main/java/org/redisson/client/protocol/RedisCommands.java +++ b/src/main/java/org/redisson/client/protocol/RedisCommands.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,8 @@ import org.redisson.client.protocol.convertor.LongReplayConvertor; import org.redisson.client.protocol.convertor.TrueReplayConvertor; import org.redisson.client.protocol.convertor.TypeConvertor; import org.redisson.client.protocol.convertor.VoidReplayConvertor; +import org.redisson.client.protocol.decoder.ClusterNodesDecoder; +import org.redisson.client.protocol.decoder.FlatNestedMultiDecoder; import org.redisson.client.protocol.decoder.KeyValueObjectDecoder; import org.redisson.client.protocol.decoder.ListResultReplayDecoder; import org.redisson.client.protocol.decoder.ListScanResult; @@ -43,7 +45,6 @@ import org.redisson.client.protocol.decoder.ListScanResultReplayDecoder; import org.redisson.client.protocol.decoder.MapScanResult; import org.redisson.client.protocol.decoder.MapScanResultReplayDecoder; import org.redisson.client.protocol.decoder.NestedMultiDecoder; -import org.redisson.client.protocol.decoder.FlatNestedMultiDecoder; import org.redisson.client.protocol.decoder.ObjectFirstResultReplayDecoder; import org.redisson.client.protocol.decoder.ObjectListReplayDecoder; import org.redisson.client.protocol.decoder.ObjectMapEntryReplayDecoder; @@ -57,6 +58,7 @@ import org.redisson.client.protocol.decoder.StringListReplayDecoder; import org.redisson.client.protocol.decoder.StringMapDataDecoder; import org.redisson.client.protocol.decoder.StringReplayDecoder; import org.redisson.client.protocol.pubsub.PubSubStatusDecoder; +import org.redisson.cluster.ClusterNodeInfo; import org.redisson.core.RType; public interface RedisCommands { @@ -255,7 +257,7 @@ public interface RedisCommands { RedisCommand PSUBSCRIBE = new RedisCommand("PSUBSCRIBE", new PubSubStatusDecoder()); RedisCommand PUNSUBSCRIBE = new RedisCommand("PUNSUBSCRIBE", new PubSubStatusDecoder()); - RedisStrictCommand CLUSTER_NODES = new RedisStrictCommand("CLUSTER", "NODES", new StringDataDecoder()); + RedisStrictCommand> CLUSTER_NODES = new RedisStrictCommand>("CLUSTER", "NODES", new ClusterNodesDecoder()); RedisStrictCommand> CLUSTER_INFO = new RedisStrictCommand>("CLUSTER", "INFO", new StringMapDataDecoder()); RedisStrictCommand> SENTINEL_GET_MASTER_ADDR_BY_NAME = new RedisStrictCommand>("SENTINEL", "GET-MASTER-ADDR-BY-NAME", new StringListReplayDecoder()); @@ -263,6 +265,12 @@ public interface RedisCommands { new FlatNestedMultiDecoder(new ObjectMapReplayDecoder(), new ListResultReplayDecoder()), ValueType.OBJECT ); + RedisStrictCommand CLUSTER_REPLICATE = new RedisStrictCommand("CLUSTER", "REPLICATE"); + RedisStrictCommand CLUSTER_FORGET = new RedisStrictCommand("CLUSTER", "FORGET"); + RedisStrictCommand> CLUSTER_GETKEYSINSLOT = new RedisStrictCommand>("CLUSTER", "GETKEYSINSLOT", new StringListReplayDecoder()); + RedisStrictCommand CLUSTER_SETSLOT = new RedisStrictCommand("CLUSTER", "SETSLOT"); + RedisStrictCommand CLUSTER_MEET = new RedisStrictCommand("CLUSTER", "MEET"); + RedisStrictCommand> INFO_CLUSTER = new RedisStrictCommand>("INFO", "CLUSTER", new StringMapDataDecoder()); RedisStrictCommand INFO_REPLICATION = new RedisStrictCommand("INFO", "replication", new StringDataDecoder()); RedisStrictCommand> INFO_PERSISTENCE = new RedisStrictCommand>("INFO", "persistence", new StringMapDataDecoder()); RedisStrictCommand> SERVER_INFO = new RedisStrictCommand>("INFO", "SERVER", new StringMapDataDecoder()); diff --git a/src/main/java/org/redisson/client/protocol/RedisStrictCommand.java b/src/main/java/org/redisson/client/protocol/RedisStrictCommand.java index 400eadaef..baecd6d7b 100644 --- a/src/main/java/org/redisson/client/protocol/RedisStrictCommand.java +++ b/src/main/java/org/redisson/client/protocol/RedisStrictCommand.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,10 @@ public class RedisStrictCommand extends RedisCommand { super(name, convertor, encodeParamIndex); } + public RedisStrictCommand(String name, String subName) { + super(name, subName); + } + public RedisStrictCommand(String name, String subName, Convertor convertor) { super(name, subName, convertor); } diff --git a/src/main/java/org/redisson/client/protocol/ScoredEntry.java b/src/main/java/org/redisson/client/protocol/ScoredEntry.java index 9bbd56801..cdb668be0 100644 --- a/src/main/java/org/redisson/client/protocol/ScoredEntry.java +++ b/src/main/java/org/redisson/client/protocol/ScoredEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BitSetReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BitSetReplayConvertor.java index e943b819a..1f901d0d0 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BitSetReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BitSetReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BitsSizeReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BitsSizeReplayConvertor.java index 4304cd100..03ddd87f7 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BitsSizeReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BitsSizeReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BooleanAmountReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BooleanAmountReplayConvertor.java index b3d11733c..0c95e8285 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BooleanAmountReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BooleanAmountReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BooleanNotNullReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BooleanNotNullReplayConvertor.java index 845ba698d..1924653d4 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BooleanNotNullReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BooleanNotNullReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BooleanNullReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BooleanNullReplayConvertor.java index 3a145347a..5db231b7c 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BooleanNullReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BooleanNullReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BooleanNumberReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BooleanNumberReplayConvertor.java index 6169ed902..cf72290cf 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BooleanNumberReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BooleanNumberReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/BooleanReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/BooleanReplayConvertor.java index 35d2b8e09..3c5d4559f 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/BooleanReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/BooleanReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/Convertor.java b/src/main/java/org/redisson/client/protocol/convertor/Convertor.java index dd1c72d88..012869702 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/Convertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/Convertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/DoubleReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/DoubleReplayConvertor.java index dd1a51eca..59af86a8f 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/DoubleReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/DoubleReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/EmptyConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/EmptyConvertor.java index 8ebfba99b..96c4892a8 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/EmptyConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/EmptyConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/IntegerReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/IntegerReplayConvertor.java index 11529a0be..efcef0ec4 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/IntegerReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/IntegerReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/KeyValueConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/KeyValueConvertor.java index b01f9c806..f2902d6a7 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/KeyValueConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/KeyValueConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/LongReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/LongReplayConvertor.java index d50db5a34..0bd6edcbd 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/LongReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/LongReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/NumberConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/NumberConvertor.java index bd69d48f8..093a6b5ca 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/NumberConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/NumberConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/SingleConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/SingleConvertor.java index c62aec746..f9d5b63f4 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/SingleConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/SingleConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/TrueReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/TrueReplayConvertor.java index 64cfa5c3d..f922d8e6c 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/TrueReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/TrueReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/TypeConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/TypeConvertor.java index f0249e0a9..2462ba801 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/TypeConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/TypeConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/convertor/VoidReplayConvertor.java b/src/main/java/org/redisson/client/protocol/convertor/VoidReplayConvertor.java index 0dc45fb9a..38e9ced52 100644 --- a/src/main/java/org/redisson/client/protocol/convertor/VoidReplayConvertor.java +++ b/src/main/java/org/redisson/client/protocol/convertor/VoidReplayConvertor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ClusterNodesDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ClusterNodesDecoder.java new file mode 100644 index 000000000..128fc2191 --- /dev/null +++ b/src/main/java/org/redisson/client/protocol/decoder/ClusterNodesDecoder.java @@ -0,0 +1,83 @@ +/** + * Copyright 2016 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.client.protocol.decoder; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.redisson.client.handler.State; +import org.redisson.client.protocol.Decoder; +import org.redisson.cluster.ClusterNodeInfo; +import org.redisson.cluster.ClusterSlotRange; + +import io.netty.buffer.ByteBuf; +import io.netty.util.CharsetUtil; + +/** + * + * @author Nikita Koksharov + * + */ +public class ClusterNodesDecoder implements Decoder> { + + @Override + public List decode(ByteBuf buf, State state) throws IOException { + String response = buf.toString(CharsetUtil.UTF_8); + + List nodes = new ArrayList(); + for (String nodeInfo : response.split("\n")) { + ClusterNodeInfo node = new ClusterNodeInfo(nodeInfo); + String[] params = nodeInfo.split(" "); + + String nodeId = params[0]; + node.setNodeId(nodeId); + + String addr = params[1]; + node.setAddress(addr); + + String flags = params[2]; + for (String flag : flags.split(",")) { + String flagValue = flag.toUpperCase().replaceAll("\\?", ""); + node.addFlag(ClusterNodeInfo.Flag.valueOf(flagValue)); + } + + String slaveOf = params[3]; + if (!"-".equals(slaveOf)) { + node.setSlaveOf(slaveOf); + } + + if (params.length > 8) { + for (int i = 0; i < params.length - 8; i++) { + String slots = params[i + 8]; + if (slots.indexOf("-<-") != -1 || slots.indexOf("->-") != -1) { + continue; + } + + String[] parts = slots.split("-"); + if(parts.length == 1) { + node.addSlotRange(new ClusterSlotRange(Integer.valueOf(parts[0]), Integer.valueOf(parts[0]))); + } else if(parts.length == 2) { + node.addSlotRange(new ClusterSlotRange(Integer.valueOf(parts[0]), Integer.valueOf(parts[1]))); + } + } + } + nodes.add(node); + } + return nodes; + } + +} diff --git a/src/main/java/org/redisson/client/protocol/decoder/DecoderState.java b/src/main/java/org/redisson/client/protocol/decoder/DecoderState.java index 1c9c78afa..10c3768f8 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/DecoderState.java +++ b/src/main/java/org/redisson/client/protocol/decoder/DecoderState.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/FlatNestedMultiDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/FlatNestedMultiDecoder.java index 72f5cfc1c..f83204cfd 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/FlatNestedMultiDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/FlatNestedMultiDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceDecoder.java index 4464f27b5..12dac9242 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceMapDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceMapDecoder.java index 9e9d526e5..0745b04c0 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceMapDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/GeoDistanceMapDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/GeoMapReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/GeoMapReplayDecoder.java index 94c043a47..a405ad357 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/GeoMapReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/GeoMapReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/GeoPositionDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/GeoPositionDecoder.java index 3b3fea8f0..4567d7abf 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/GeoPositionDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/GeoPositionDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/GeoPositionMapDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/GeoPositionMapDecoder.java index 07ac3662f..def4343c1 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/GeoPositionMapDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/GeoPositionMapDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/KeyValueMessage.java b/src/main/java/org/redisson/client/protocol/decoder/KeyValueMessage.java index 6df068996..1a52e1057 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/KeyValueMessage.java +++ b/src/main/java/org/redisson/client/protocol/decoder/KeyValueMessage.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/KeyValueObjectDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/KeyValueObjectDecoder.java index 73f238c23..42ca5e798 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/KeyValueObjectDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/KeyValueObjectDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ListIteratorReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ListIteratorReplayDecoder.java index 22cbf266a..473a46ed1 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ListIteratorReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ListIteratorReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ListIteratorResult.java b/src/main/java/org/redisson/client/protocol/decoder/ListIteratorResult.java index 84967475a..4fc4ffb66 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ListIteratorResult.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ListIteratorResult.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ListMultiDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ListMultiDecoder.java index 3b9df4013..48072d8cb 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ListMultiDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ListMultiDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ListResultReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ListResultReplayDecoder.java index da09096d2..ab75de8f0 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ListResultReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ListResultReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ListScanResult.java b/src/main/java/org/redisson/client/protocol/decoder/ListScanResult.java index 830415d5c..75a97dd3a 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ListScanResult.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ListScanResult.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ListScanResultReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ListScanResultReplayDecoder.java index d78e19c64..b47af1ed0 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ListScanResultReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ListScanResultReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/LongMultiDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/LongMultiDecoder.java index 30a2ee66d..0db640e7e 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/LongMultiDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/LongMultiDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResult.java b/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResult.java index 0a6e9b2f2..0aa07d843 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResult.java +++ b/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResult.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResultReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResultReplayDecoder.java index afed8cc14..a459a723c 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResultReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/MapCacheScanResultReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/MapScanResult.java b/src/main/java/org/redisson/client/protocol/decoder/MapScanResult.java index 4672587b5..f83c53ecb 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/MapScanResult.java +++ b/src/main/java/org/redisson/client/protocol/decoder/MapScanResult.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/MapScanResultReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/MapScanResultReplayDecoder.java index 3a0185ffb..577f95feb 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/MapScanResultReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/MapScanResultReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/MultiDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/MultiDecoder.java index 162947f55..4b3d09e49 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/MultiDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/MultiDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/NestedMultiDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/NestedMultiDecoder.java index 2fcd87c4e..3ef1f90f5 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/NestedMultiDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/NestedMultiDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectFirstResultReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectFirstResultReplayDecoder.java index a022ff52c..e3c443d8a 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectFirstResultReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectFirstResultReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectListDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectListDecoder.java index 9b3ac26ee..a77636054 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectListDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectListDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectListReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectListReplayDecoder.java index 82ffe3226..6722c58a6 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectListReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectListReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectMapDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectMapDecoder.java index 3b1c1c6bb..16cdff6ab 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectMapDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectMapDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectMapEntryReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectMapEntryReplayDecoder.java index fb95414b2..a01db6a02 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectMapEntryReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectMapEntryReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectMapReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectMapReplayDecoder.java index b5ac7c493..884c72898 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectMapReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectMapReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ObjectSetReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ObjectSetReplayDecoder.java index ac5df9c37..3098f11dc 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ObjectSetReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ObjectSetReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ScanObjectEntry.java b/src/main/java/org/redisson/client/protocol/decoder/ScanObjectEntry.java index 1c7ed8bbe..624fcfce9 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ScanObjectEntry.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ScanObjectEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetReplayDecoder.java index cb2ff1376..ed46da066 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanDecoder.java index 5644b0591..ba9c76caf 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanReplayDecoder.java index bcbe844c1..4145e9825 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/ScoredSortedSetScanReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/StringDataDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/StringDataDecoder.java index d849a5f38..4a4298ba4 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/StringDataDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/StringDataDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/StringListReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/StringListReplayDecoder.java index 2415299e7..dc42489f4 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/StringListReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/StringListReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/StringMapDataDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/StringMapDataDecoder.java index d8c8c8218..2d0c20e73 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/StringMapDataDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/StringMapDataDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/StringReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/StringReplayDecoder.java index 499c3f343..b0b796af9 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/StringReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/StringReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/decoder/TTLMapValueReplayDecoder.java b/src/main/java/org/redisson/client/protocol/decoder/TTLMapValueReplayDecoder.java index 68f862633..7d7cff0ec 100644 --- a/src/main/java/org/redisson/client/protocol/decoder/TTLMapValueReplayDecoder.java +++ b/src/main/java/org/redisson/client/protocol/decoder/TTLMapValueReplayDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/Message.java b/src/main/java/org/redisson/client/protocol/pubsub/Message.java index e860268f6..2c5ff0d0c 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/Message.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/Message.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessage.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessage.java index 97a89c59c..3c8375f58 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessage.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessage.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessageDecoder.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessageDecoder.java index b10709924..e512d3685 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessageDecoder.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessage.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessage.java index c43d86ab7..a85306954 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessage.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessage.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessageDecoder.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessageDecoder.java index 956517736..e710754ca 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessageDecoder.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubPatternMessageDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusDecoder.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusDecoder.java index 2ec55b517..48196e6a4 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusDecoder.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusMessage.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusMessage.java index 70c5f3d85..6aed911fd 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusMessage.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubStatusMessage.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/client/protocol/pubsub/PubSubType.java b/src/main/java/org/redisson/client/protocol/pubsub/PubSubType.java index d7decde45..34d67cdcf 100644 --- a/src/main/java/org/redisson/client/protocol/pubsub/PubSubType.java +++ b/src/main/java/org/redisson/client/protocol/pubsub/PubSubType.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/cluster/ClusterConnectionListener.java b/src/main/java/org/redisson/cluster/ClusterConnectionListener.java index 18b4aa775..f79e86361 100644 --- a/src/main/java/org/redisson/cluster/ClusterConnectionListener.java +++ b/src/main/java/org/redisson/cluster/ClusterConnectionListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/cluster/ClusterConnectionManager.java b/src/main/java/org/redisson/cluster/ClusterConnectionManager.java index 9741e3f41..1857f4bd1 100644 --- a/src/main/java/org/redisson/cluster/ClusterConnectionManager.java +++ b/src/main/java/org/redisson/cluster/ClusterConnectionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,11 +73,17 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager { Future connectionFuture = connect(cfg, addr); try { RedisConnection connection = connectionFuture.syncUninterruptibly().getNow(); - String nodesValue = connection.sync(RedisCommands.CLUSTER_NODES); + List nodes = connection.sync(RedisCommands.CLUSTER_NODES); - log.debug("cluster nodes state from {} during startup:\n{}", connection.getRedisClient().getAddr(), nodesValue); + if (log.isDebugEnabled()) { + StringBuilder nodesValue = new StringBuilder(); + for (ClusterNodeInfo clusterNodeInfo : nodes) { + nodesValue.append(clusterNodeInfo.getNodeInfo()).append("\n"); + } + log.debug("cluster nodes state from {}:\n{}", connection.getRedisClient().getAddr(), nodesValue); + } - Collection partitions = parsePartitions(nodesValue); + Collection partitions = parsePartitions(nodes); List>>> futures = new ArrayList>>>(); for (ClusterPartition partition : partitions) { if (partition.isMasterFail()) { @@ -316,10 +322,10 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager { } private void updateClusterState(final ClusterServersConfig cfg, final RedisConnection connection, final Iterator iterator) { - Future future = connection.asyncWithTimeout(null, RedisCommands.CLUSTER_NODES); - future.addListener(new FutureListener() { + Future> future = connection.asyncWithTimeout(null, RedisCommands.CLUSTER_NODES); + future.addListener(new FutureListener>() { @Override - public void operationComplete(Future future) throws Exception { + public void operationComplete(Future> future) throws Exception { if (!future.isSuccess()) { log.error("Can't execute CLUSTER_NODES with " + connection.getRedisClient().getAddr(), future.cause()); close(connection); @@ -327,10 +333,16 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager { return; } - String nodesValue = future.getNow(); - log.debug("cluster nodes state from {}:\n{}", connection.getRedisClient().getAddr(), nodesValue); + List nodes = future.getNow(); + if (log.isDebugEnabled()) { + StringBuilder nodesValue = new StringBuilder(); + for (ClusterNodeInfo clusterNodeInfo : nodes) { + nodesValue.append(clusterNodeInfo.getNodeInfo()).append("\n"); + } + log.debug("cluster nodes state from {}:\n{}", connection.getRedisClient().getAddr(), nodesValue); + } - Collection newPartitions = parsePartitions(nodesValue); + Collection newPartitions = parsePartitions(nodes); checkMasterNodesChange(newPartitions); checkSlaveNodesChange(newPartitions); checkSlotsChange(cfg, newPartitions); @@ -557,9 +569,8 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager { return result; } - private Collection parsePartitions(String nodesValue) { + private Collection parsePartitions(List nodes) { Map partitions = new HashMap(); - List nodes = parse(nodesValue); for (ClusterNodeInfo clusterNodeInfo : nodes) { if (clusterNodeInfo.containsFlag(Flag.NOADDR)) { // skip it @@ -596,46 +607,6 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager { return partitions.values(); } - private List parse(String nodesResponse) { - List nodes = new ArrayList(); - for (String nodeInfo : nodesResponse.split("\n")) { - ClusterNodeInfo node = new ClusterNodeInfo(); - String[] params = nodeInfo.split(" "); - - String nodeId = params[0]; - node.setNodeId(nodeId); - - String addr = params[1]; - node.setAddress(addr); - - String flags = params[2]; - for (String flag : flags.split(",")) { - String flagValue = flag.toUpperCase().replaceAll("\\?", ""); - node.addFlag(ClusterNodeInfo.Flag.valueOf(flagValue)); - } - - String slaveOf = params[3]; - if (!"-".equals(slaveOf)) { - node.setSlaveOf(slaveOf); - } - - if (params.length > 8) { - for (int i = 0; i < params.length - 8; i++) { - String slots = params[i + 8]; - String[] parts = slots.split("-"); - - if(parts.length == 1) { - node.addSlotRange(new ClusterSlotRange(Integer.valueOf(parts[0]), Integer.valueOf(parts[0]))); - } else if(parts.length == 2) { - node.addSlotRange(new ClusterSlotRange(Integer.valueOf(parts[0]), Integer.valueOf(parts[1]))); - } - } - } - nodes.add(node); - } - return nodes; - } - @Override public void shutdown() { monitorFuture.cancel(true); diff --git a/src/main/java/org/redisson/cluster/ClusterNodeInfo.java b/src/main/java/org/redisson/cluster/ClusterNodeInfo.java index 6c1df8914..241625981 100644 --- a/src/main/java/org/redisson/cluster/ClusterNodeInfo.java +++ b/src/main/java/org/redisson/cluster/ClusterNodeInfo.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,17 @@ import java.util.Set; import org.redisson.misc.URIBuilder; +/** + * + * @author Nikita Koksharov + * + */ public class ClusterNodeInfo { public enum Flag {NOFLAGS, SLAVE, MASTER, MYSELF, FAIL, HANDSHAKE, NOADDR}; + private final String nodeInfo; + private String nodeId; private URI address; private final Set flags = new HashSet(); @@ -32,6 +39,10 @@ public class ClusterNodeInfo { private final Set slotRanges = new HashSet(); + public ClusterNodeInfo(String nodeInfo) { + this.nodeInfo = nodeInfo; + } + public String getNodeId() { return nodeId; } @@ -67,6 +78,10 @@ public class ClusterNodeInfo { this.slaveOf = slaveOf; } + public String getNodeInfo() { + return nodeInfo; + } + @Override public String toString() { return "ClusterNodeInfo [nodeId=" + nodeId + ", address=" + address + ", flags=" + flags diff --git a/src/main/java/org/redisson/cluster/ClusterPartition.java b/src/main/java/org/redisson/cluster/ClusterPartition.java index ace54a42d..5af6037ff 100644 --- a/src/main/java/org/redisson/cluster/ClusterPartition.java +++ b/src/main/java/org/redisson/cluster/ClusterPartition.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/cluster/ClusterSlotRange.java b/src/main/java/org/redisson/cluster/ClusterSlotRange.java index b1198b780..8bd5c5f9f 100644 --- a/src/main/java/org/redisson/cluster/ClusterSlotRange.java +++ b/src/main/java/org/redisson/cluster/ClusterSlotRange.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,10 @@ public class ClusterSlotRange { public int getEndSlot() { return endSlot; } + + public int size() { + return endSlot - startSlot + 1; + } public boolean isOwn(int slot) { return slot >= startSlot && slot <= endSlot; diff --git a/src/main/java/org/redisson/codec/CborJacksonCodec.java b/src/main/java/org/redisson/codec/CborJacksonCodec.java index fd16a8f2b..cd98b4336 100644 --- a/src/main/java/org/redisson/codec/CborJacksonCodec.java +++ b/src/main/java/org/redisson/codec/CborJacksonCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/FstCodec.java b/src/main/java/org/redisson/codec/FstCodec.java index 501883ac0..9cadc3df3 100644 --- a/src/main/java/org/redisson/codec/FstCodec.java +++ b/src/main/java/org/redisson/codec/FstCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/JsonJacksonCodec.java b/src/main/java/org/redisson/codec/JsonJacksonCodec.java index 6d66fdda5..f84ece1b7 100755 --- a/src/main/java/org/redisson/codec/JsonJacksonCodec.java +++ b/src/main/java/org/redisson/codec/JsonJacksonCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/KryoCodec.java b/src/main/java/org/redisson/codec/KryoCodec.java index 2da3febad..ab2b98767 100755 --- a/src/main/java/org/redisson/codec/KryoCodec.java +++ b/src/main/java/org/redisson/codec/KryoCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/LZ4Codec.java b/src/main/java/org/redisson/codec/LZ4Codec.java index 01afffa60..e53f4ebde 100644 --- a/src/main/java/org/redisson/codec/LZ4Codec.java +++ b/src/main/java/org/redisson/codec/LZ4Codec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/MsgPackJacksonCodec.java b/src/main/java/org/redisson/codec/MsgPackJacksonCodec.java index 575e34acd..50e25a660 100644 --- a/src/main/java/org/redisson/codec/MsgPackJacksonCodec.java +++ b/src/main/java/org/redisson/codec/MsgPackJacksonCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/SerializationCodec.java b/src/main/java/org/redisson/codec/SerializationCodec.java index b698bd130..59b7724c6 100644 --- a/src/main/java/org/redisson/codec/SerializationCodec.java +++ b/src/main/java/org/redisson/codec/SerializationCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/codec/SnappyCodec.java b/src/main/java/org/redisson/codec/SnappyCodec.java index 7f5682c64..bb6ef4a28 100644 --- a/src/main/java/org/redisson/codec/SnappyCodec.java +++ b/src/main/java/org/redisson/codec/SnappyCodec.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/AsyncDetails.java b/src/main/java/org/redisson/command/AsyncDetails.java index c777c97e5..0ea4c2fcd 100644 --- a/src/main/java/org/redisson/command/AsyncDetails.java +++ b/src/main/java/org/redisson/command/AsyncDetails.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandAsyncExecutor.java b/src/main/java/org/redisson/command/CommandAsyncExecutor.java index 8bb0cc2b4..8c3b42f5f 100644 --- a/src/main/java/org/redisson/command/CommandAsyncExecutor.java +++ b/src/main/java/org/redisson/command/CommandAsyncExecutor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandAsyncService.java b/src/main/java/org/redisson/command/CommandAsyncService.java index 538330823..e75a6d6c2 100644 --- a/src/main/java/org/redisson/command/CommandAsyncService.java +++ b/src/main/java/org/redisson/command/CommandAsyncService.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -554,7 +554,11 @@ public class CommandAsyncService implements CommandAsyncExecutor { if (scheduledFuture != null) { scheduledFuture.cancel(false); } - connectionManager.getShutdownPromise().removeListener(listener); + + synchronized (listener) { + connectionManager.getShutdownPromise().removeListener(listener); + } + // handling cancel operation for commands from skipTimeout collection if ((future.isCancelled() && details.getAttemptPromise().cancel(true)) || canceledByScheduler.get()) { @@ -579,7 +583,11 @@ public class CommandAsyncService implements CommandAsyncExecutor { } }); - connectionManager.getShutdownPromise().addListener(listener); + synchronized (listener) { + if (!details.getMainPromise().isDone()) { + connectionManager.getShutdownPromise().addListener(listener); + } + } } private void checkConnectionFuture(final NodeSource source, diff --git a/src/main/java/org/redisson/command/CommandBatchService.java b/src/main/java/org/redisson/command/CommandBatchService.java index f21154eb1..a672944fe 100644 --- a/src/main/java/org/redisson/command/CommandBatchService.java +++ b/src/main/java/org/redisson/command/CommandBatchService.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandExecutor.java b/src/main/java/org/redisson/command/CommandExecutor.java index 4b47f0ced..3f26d0fab 100644 --- a/src/main/java/org/redisson/command/CommandExecutor.java +++ b/src/main/java/org/redisson/command/CommandExecutor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandReactiveExecutor.java b/src/main/java/org/redisson/command/CommandReactiveExecutor.java index 6232e584b..772ebac88 100644 --- a/src/main/java/org/redisson/command/CommandReactiveExecutor.java +++ b/src/main/java/org/redisson/command/CommandReactiveExecutor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandReactiveService.java b/src/main/java/org/redisson/command/CommandReactiveService.java index a79f6a716..e7d630c5e 100644 --- a/src/main/java/org/redisson/command/CommandReactiveService.java +++ b/src/main/java/org/redisson/command/CommandReactiveService.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandSyncExecutor.java b/src/main/java/org/redisson/command/CommandSyncExecutor.java index 4e60b8def..ac6c70ca9 100644 --- a/src/main/java/org/redisson/command/CommandSyncExecutor.java +++ b/src/main/java/org/redisson/command/CommandSyncExecutor.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/command/CommandSyncService.java b/src/main/java/org/redisson/command/CommandSyncService.java index 007ea6ab1..f99372496 100644 --- a/src/main/java/org/redisson/command/CommandSyncService.java +++ b/src/main/java/org/redisson/command/CommandSyncService.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/CRC16.java b/src/main/java/org/redisson/connection/CRC16.java index 1a183721c..a2db447e9 100644 --- a/src/main/java/org/redisson/connection/CRC16.java +++ b/src/main/java/org/redisson/connection/CRC16.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/ClientConnectionsEntry.java b/src/main/java/org/redisson/connection/ClientConnectionsEntry.java index 6faf953b8..57cb6674c 100644 --- a/src/main/java/org/redisson/connection/ClientConnectionsEntry.java +++ b/src/main/java/org/redisson/connection/ClientConnectionsEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/ConnectionEventsHub.java b/src/main/java/org/redisson/connection/ConnectionEventsHub.java index 3ce29ddfe..7f67c5db6 100644 --- a/src/main/java/org/redisson/connection/ConnectionEventsHub.java +++ b/src/main/java/org/redisson/connection/ConnectionEventsHub.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/ConnectionInitializer.java b/src/main/java/org/redisson/connection/ConnectionInitializer.java index 50deb2c42..6a83e8192 100644 --- a/src/main/java/org/redisson/connection/ConnectionInitializer.java +++ b/src/main/java/org/redisson/connection/ConnectionInitializer.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/ConnectionListener.java b/src/main/java/org/redisson/connection/ConnectionListener.java index efd93e9ca..cd564a892 100644 --- a/src/main/java/org/redisson/connection/ConnectionListener.java +++ b/src/main/java/org/redisson/connection/ConnectionListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/ConnectionManager.java b/src/main/java/org/redisson/connection/ConnectionManager.java index 2dc3b1afc..4750e4fb6 100644 --- a/src/main/java/org/redisson/connection/ConnectionManager.java +++ b/src/main/java/org/redisson/connection/ConnectionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/DefaultConnectionListener.java b/src/main/java/org/redisson/connection/DefaultConnectionListener.java index 27c100d79..fed8e666a 100644 --- a/src/main/java/org/redisson/connection/DefaultConnectionListener.java +++ b/src/main/java/org/redisson/connection/DefaultConnectionListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/ElasticacheConnectionManager.java b/src/main/java/org/redisson/connection/ElasticacheConnectionManager.java index 33b6bba65..91eafb6c6 100644 --- a/src/main/java/org/redisson/connection/ElasticacheConnectionManager.java +++ b/src/main/java/org/redisson/connection/ElasticacheConnectionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/FutureConnectionListener.java b/src/main/java/org/redisson/connection/FutureConnectionListener.java index 5dbd7c6e0..23af19ebb 100644 --- a/src/main/java/org/redisson/connection/FutureConnectionListener.java +++ b/src/main/java/org/redisson/connection/FutureConnectionListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/IdleConnectionWatcher.java b/src/main/java/org/redisson/connection/IdleConnectionWatcher.java index 0813ae17f..6fc92b2cf 100644 --- a/src/main/java/org/redisson/connection/IdleConnectionWatcher.java +++ b/src/main/java/org/redisson/connection/IdleConnectionWatcher.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java b/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java index d49530773..3f0912e22 100644 --- a/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java +++ b/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/MasterSlaveEntry.java b/src/main/java/org/redisson/connection/MasterSlaveEntry.java index 643f5902b..a17389dec 100644 --- a/src/main/java/org/redisson/connection/MasterSlaveEntry.java +++ b/src/main/java/org/redisson/connection/MasterSlaveEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/NodeSource.java b/src/main/java/org/redisson/connection/NodeSource.java index 920ef8068..63cfbaeb3 100644 --- a/src/main/java/org/redisson/connection/NodeSource.java +++ b/src/main/java/org/redisson/connection/NodeSource.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/PubSubConnectionEntry.java b/src/main/java/org/redisson/connection/PubSubConnectionEntry.java index c045c1430..9d83363f3 100644 --- a/src/main/java/org/redisson/connection/PubSubConnectionEntry.java +++ b/src/main/java/org/redisson/connection/PubSubConnectionEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,12 +76,17 @@ public class PubSubConnectionEntry { } } + boolean deleted = false; synchronized (queue) { if (channelListeners.get(channelName) != queue) { - addListener(channelName, listener); - return; + deleted = true; + } else { + queue.add(listener); } - queue.add(listener); + } + if (deleted) { + addListener(channelName, listener); + return; } conn.addListener(listener); diff --git a/src/main/java/org/redisson/connection/RedisClientEntry.java b/src/main/java/org/redisson/connection/RedisClientEntry.java index 9150613fc..5f1bb8b73 100644 --- a/src/main/java/org/redisson/connection/RedisClientEntry.java +++ b/src/main/java/org/redisson/connection/RedisClientEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/SentinelConnectionManager.java b/src/main/java/org/redisson/connection/SentinelConnectionManager.java index 2d04f5ba0..5d93776bf 100755 --- a/src/main/java/org/redisson/connection/SentinelConnectionManager.java +++ b/src/main/java/org/redisson/connection/SentinelConnectionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/SingleConnectionManager.java b/src/main/java/org/redisson/connection/SingleConnectionManager.java index 155fa44ae..fc24163a4 100644 --- a/src/main/java/org/redisson/connection/SingleConnectionManager.java +++ b/src/main/java/org/redisson/connection/SingleConnectionManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/SingleEntry.java b/src/main/java/org/redisson/connection/SingleEntry.java index 16ad97101..8d2dda578 100644 --- a/src/main/java/org/redisson/connection/SingleEntry.java +++ b/src/main/java/org/redisson/connection/SingleEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/balancer/LoadBalancer.java b/src/main/java/org/redisson/connection/balancer/LoadBalancer.java index 5cf87c7b9..9dc15f1d9 100644 --- a/src/main/java/org/redisson/connection/balancer/LoadBalancer.java +++ b/src/main/java/org/redisson/connection/balancer/LoadBalancer.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/balancer/LoadBalancerManager.java b/src/main/java/org/redisson/connection/balancer/LoadBalancerManager.java index 02d408f29..a3342ab90 100644 --- a/src/main/java/org/redisson/connection/balancer/LoadBalancerManager.java +++ b/src/main/java/org/redisson/connection/balancer/LoadBalancerManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/balancer/LoadBalancerManagerImpl.java b/src/main/java/org/redisson/connection/balancer/LoadBalancerManagerImpl.java index 38bf4b781..c90580dc0 100644 --- a/src/main/java/org/redisson/connection/balancer/LoadBalancerManagerImpl.java +++ b/src/main/java/org/redisson/connection/balancer/LoadBalancerManagerImpl.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/balancer/RandomLoadBalancer.java b/src/main/java/org/redisson/connection/balancer/RandomLoadBalancer.java index debb037ef..ab6c77c7d 100644 --- a/src/main/java/org/redisson/connection/balancer/RandomLoadBalancer.java +++ b/src/main/java/org/redisson/connection/balancer/RandomLoadBalancer.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/balancer/RoundRobinLoadBalancer.java b/src/main/java/org/redisson/connection/balancer/RoundRobinLoadBalancer.java index cdc281665..b1a83b0ac 100644 --- a/src/main/java/org/redisson/connection/balancer/RoundRobinLoadBalancer.java +++ b/src/main/java/org/redisson/connection/balancer/RoundRobinLoadBalancer.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/balancer/WeightedRoundRobinBalancer.java b/src/main/java/org/redisson/connection/balancer/WeightedRoundRobinBalancer.java index aca4ef99a..b7f43d0c0 100644 --- a/src/main/java/org/redisson/connection/balancer/WeightedRoundRobinBalancer.java +++ b/src/main/java/org/redisson/connection/balancer/WeightedRoundRobinBalancer.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/decoder/CacheGetAllDecoder.java b/src/main/java/org/redisson/connection/decoder/CacheGetAllDecoder.java index 0d14eff2d..0e7cb4f27 100644 --- a/src/main/java/org/redisson/connection/decoder/CacheGetAllDecoder.java +++ b/src/main/java/org/redisson/connection/decoder/CacheGetAllDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/decoder/ListDrainToDecoder.java b/src/main/java/org/redisson/connection/decoder/ListDrainToDecoder.java index 0dabcc921..b51749afc 100644 --- a/src/main/java/org/redisson/connection/decoder/ListDrainToDecoder.java +++ b/src/main/java/org/redisson/connection/decoder/ListDrainToDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/decoder/ListFirstObjectDecoder.java b/src/main/java/org/redisson/connection/decoder/ListFirstObjectDecoder.java index 96ce789ff..27e7285a9 100644 --- a/src/main/java/org/redisson/connection/decoder/ListFirstObjectDecoder.java +++ b/src/main/java/org/redisson/connection/decoder/ListFirstObjectDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java b/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java index 7ce90ee4f..4d03b692a 100644 --- a/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java +++ b/src/main/java/org/redisson/connection/decoder/MapGetAllDecoder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/pool/ConnectionPool.java b/src/main/java/org/redisson/connection/pool/ConnectionPool.java index 6d46625cb..9a0a52697 100644 --- a/src/main/java/org/redisson/connection/pool/ConnectionPool.java +++ b/src/main/java/org/redisson/connection/pool/ConnectionPool.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/pool/MasterConnectionPool.java b/src/main/java/org/redisson/connection/pool/MasterConnectionPool.java index d61d6411c..23c7f066d 100644 --- a/src/main/java/org/redisson/connection/pool/MasterConnectionPool.java +++ b/src/main/java/org/redisson/connection/pool/MasterConnectionPool.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/pool/PubSubConnectionPool.java b/src/main/java/org/redisson/connection/pool/PubSubConnectionPool.java index a14810dd2..d1a64fad1 100644 --- a/src/main/java/org/redisson/connection/pool/PubSubConnectionPool.java +++ b/src/main/java/org/redisson/connection/pool/PubSubConnectionPool.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/pool/SinglePubSubConnectionPool.java b/src/main/java/org/redisson/connection/pool/SinglePubSubConnectionPool.java index ff25e80f0..1efc5a6b4 100644 --- a/src/main/java/org/redisson/connection/pool/SinglePubSubConnectionPool.java +++ b/src/main/java/org/redisson/connection/pool/SinglePubSubConnectionPool.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/connection/pool/SlaveConnectionPool.java b/src/main/java/org/redisson/connection/pool/SlaveConnectionPool.java index cea11bda0..5f54482b1 100644 --- a/src/main/java/org/redisson/connection/pool/SlaveConnectionPool.java +++ b/src/main/java/org/redisson/connection/pool/SlaveConnectionPool.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/BasePatternStatusListener.java b/src/main/java/org/redisson/core/BasePatternStatusListener.java index 713c16a2e..922f71b06 100644 --- a/src/main/java/org/redisson/core/BasePatternStatusListener.java +++ b/src/main/java/org/redisson/core/BasePatternStatusListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/BaseStatusListener.java b/src/main/java/org/redisson/core/BaseStatusListener.java index ce541f0ad..caf2eeac2 100644 --- a/src/main/java/org/redisson/core/BaseStatusListener.java +++ b/src/main/java/org/redisson/core/BaseStatusListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/ClusterNode.java b/src/main/java/org/redisson/core/ClusterNode.java index f968241dc..a842dd446 100644 --- a/src/main/java/org/redisson/core/ClusterNode.java +++ b/src/main/java/org/redisson/core/ClusterNode.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/GeoEntry.java b/src/main/java/org/redisson/core/GeoEntry.java index 7476b619f..d1a2a8551 100644 --- a/src/main/java/org/redisson/core/GeoEntry.java +++ b/src/main/java/org/redisson/core/GeoEntry.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/GeoPosition.java b/src/main/java/org/redisson/core/GeoPosition.java index 545749273..20eebc151 100644 --- a/src/main/java/org/redisson/core/GeoPosition.java +++ b/src/main/java/org/redisson/core/GeoPosition.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/GeoUnit.java b/src/main/java/org/redisson/core/GeoUnit.java index c4610ff93..a74d9041f 100644 --- a/src/main/java/org/redisson/core/GeoUnit.java +++ b/src/main/java/org/redisson/core/GeoUnit.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/MessageListener.java b/src/main/java/org/redisson/core/MessageListener.java index 31b459bfd..e0270dee7 100644 --- a/src/main/java/org/redisson/core/MessageListener.java +++ b/src/main/java/org/redisson/core/MessageListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/Node.java b/src/main/java/org/redisson/core/Node.java index a2e77d570..539647905 100644 --- a/src/main/java/org/redisson/core/Node.java +++ b/src/main/java/org/redisson/core/Node.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/NodeListener.java b/src/main/java/org/redisson/core/NodeListener.java index 7476198ea..87e7ad2dc 100644 --- a/src/main/java/org/redisson/core/NodeListener.java +++ b/src/main/java/org/redisson/core/NodeListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/NodeType.java b/src/main/java/org/redisson/core/NodeType.java index 6692c436b..37eadadb0 100644 --- a/src/main/java/org/redisson/core/NodeType.java +++ b/src/main/java/org/redisson/core/NodeType.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/NodesGroup.java b/src/main/java/org/redisson/core/NodesGroup.java index df2d13d6c..05f57d46a 100644 --- a/src/main/java/org/redisson/core/NodesGroup.java +++ b/src/main/java/org/redisson/core/NodesGroup.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/PatternMessageListener.java b/src/main/java/org/redisson/core/PatternMessageListener.java index 8b2f06cde..4bfed6085 100644 --- a/src/main/java/org/redisson/core/PatternMessageListener.java +++ b/src/main/java/org/redisson/core/PatternMessageListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/PatternStatusListener.java b/src/main/java/org/redisson/core/PatternStatusListener.java index 4ba0446c7..66d3e528e 100644 --- a/src/main/java/org/redisson/core/PatternStatusListener.java +++ b/src/main/java/org/redisson/core/PatternStatusListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/Predicate.java b/src/main/java/org/redisson/core/Predicate.java index dfb5e998d..1c6ebb561 100644 --- a/src/main/java/org/redisson/core/Predicate.java +++ b/src/main/java/org/redisson/core/Predicate.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RAtomicDouble.java b/src/main/java/org/redisson/core/RAtomicDouble.java index 43ad604b9..6518af9c5 100644 --- a/src/main/java/org/redisson/core/RAtomicDouble.java +++ b/src/main/java/org/redisson/core/RAtomicDouble.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RAtomicDoubleAsync.java b/src/main/java/org/redisson/core/RAtomicDoubleAsync.java index 0326272e7..d12712b2a 100644 --- a/src/main/java/org/redisson/core/RAtomicDoubleAsync.java +++ b/src/main/java/org/redisson/core/RAtomicDoubleAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RAtomicLong.java b/src/main/java/org/redisson/core/RAtomicLong.java index 6230e53be..2fbbbafd1 100644 --- a/src/main/java/org/redisson/core/RAtomicLong.java +++ b/src/main/java/org/redisson/core/RAtomicLong.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RAtomicLongAsync.java b/src/main/java/org/redisson/core/RAtomicLongAsync.java index 595e62347..cbde885e3 100644 --- a/src/main/java/org/redisson/core/RAtomicLongAsync.java +++ b/src/main/java/org/redisson/core/RAtomicLongAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBatch.java b/src/main/java/org/redisson/core/RBatch.java index 5790b18a0..a1a8ff11c 100644 --- a/src/main/java/org/redisson/core/RBatch.java +++ b/src/main/java/org/redisson/core/RBatch.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBitSet.java b/src/main/java/org/redisson/core/RBitSet.java index e21a67aad..3fe1e3c4d 100644 --- a/src/main/java/org/redisson/core/RBitSet.java +++ b/src/main/java/org/redisson/core/RBitSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBitSetAsync.java b/src/main/java/org/redisson/core/RBitSetAsync.java index 32c8f2698..9b1a70090 100644 --- a/src/main/java/org/redisson/core/RBitSetAsync.java +++ b/src/main/java/org/redisson/core/RBitSetAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBlockingDeque.java b/src/main/java/org/redisson/core/RBlockingDeque.java index d3974aea1..971e5cc08 100644 --- a/src/main/java/org/redisson/core/RBlockingDeque.java +++ b/src/main/java/org/redisson/core/RBlockingDeque.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBlockingDequeAsync.java b/src/main/java/org/redisson/core/RBlockingDequeAsync.java index 7a13b6740..d3ee87e47 100644 --- a/src/main/java/org/redisson/core/RBlockingDequeAsync.java +++ b/src/main/java/org/redisson/core/RBlockingDequeAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBlockingQueue.java b/src/main/java/org/redisson/core/RBlockingQueue.java index 3293936f3..93de90c1c 100644 --- a/src/main/java/org/redisson/core/RBlockingQueue.java +++ b/src/main/java/org/redisson/core/RBlockingQueue.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBlockingQueueAsync.java b/src/main/java/org/redisson/core/RBlockingQueueAsync.java index 2240aa17e..ddeb146a1 100644 --- a/src/main/java/org/redisson/core/RBlockingQueueAsync.java +++ b/src/main/java/org/redisson/core/RBlockingQueueAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBloomFilter.java b/src/main/java/org/redisson/core/RBloomFilter.java index 5717c06c9..3517f284e 100644 --- a/src/main/java/org/redisson/core/RBloomFilter.java +++ b/src/main/java/org/redisson/core/RBloomFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBucket.java b/src/main/java/org/redisson/core/RBucket.java index 8858600d2..d07ba5843 100644 --- a/src/main/java/org/redisson/core/RBucket.java +++ b/src/main/java/org/redisson/core/RBucket.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBucketAsync.java b/src/main/java/org/redisson/core/RBucketAsync.java index 10ade8456..fbe9f2643 100644 --- a/src/main/java/org/redisson/core/RBucketAsync.java +++ b/src/main/java/org/redisson/core/RBucketAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RBuckets.java b/src/main/java/org/redisson/core/RBuckets.java index 036d7f88f..cf2b9a60a 100644 --- a/src/main/java/org/redisson/core/RBuckets.java +++ b/src/main/java/org/redisson/core/RBuckets.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RCollectionAsync.java b/src/main/java/org/redisson/core/RCollectionAsync.java index 61cfc790e..c4fad187e 100644 --- a/src/main/java/org/redisson/core/RCollectionAsync.java +++ b/src/main/java/org/redisson/core/RCollectionAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RCountDownLatch.java b/src/main/java/org/redisson/core/RCountDownLatch.java index 5f99af2bc..2e173b2c6 100644 --- a/src/main/java/org/redisson/core/RCountDownLatch.java +++ b/src/main/java/org/redisson/core/RCountDownLatch.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RCountDownLatchAsync.java b/src/main/java/org/redisson/core/RCountDownLatchAsync.java index 71e9600d0..20c258910 100644 --- a/src/main/java/org/redisson/core/RCountDownLatchAsync.java +++ b/src/main/java/org/redisson/core/RCountDownLatchAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RDeque.java b/src/main/java/org/redisson/core/RDeque.java index 96a3d7074..22f23efbd 100644 --- a/src/main/java/org/redisson/core/RDeque.java +++ b/src/main/java/org/redisson/core/RDeque.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RDequeAsync.java b/src/main/java/org/redisson/core/RDequeAsync.java index 46ee2cf65..f4c27ac2c 100644 --- a/src/main/java/org/redisson/core/RDequeAsync.java +++ b/src/main/java/org/redisson/core/RDequeAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RExpirable.java b/src/main/java/org/redisson/core/RExpirable.java index 929372a7e..5aca10a4d 100644 --- a/src/main/java/org/redisson/core/RExpirable.java +++ b/src/main/java/org/redisson/core/RExpirable.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RExpirableAsync.java b/src/main/java/org/redisson/core/RExpirableAsync.java index 5f56e5939..f058e0770 100644 --- a/src/main/java/org/redisson/core/RExpirableAsync.java +++ b/src/main/java/org/redisson/core/RExpirableAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RGeo.java b/src/main/java/org/redisson/core/RGeo.java index e07c3c02c..0f6afef35 100644 --- a/src/main/java/org/redisson/core/RGeo.java +++ b/src/main/java/org/redisson/core/RGeo.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RGeoAsync.java b/src/main/java/org/redisson/core/RGeoAsync.java index 15420b385..3c3a9f8ea 100644 --- a/src/main/java/org/redisson/core/RGeoAsync.java +++ b/src/main/java/org/redisson/core/RGeoAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RHyperLogLog.java b/src/main/java/org/redisson/core/RHyperLogLog.java index 967867bb1..4a0ebe90e 100644 --- a/src/main/java/org/redisson/core/RHyperLogLog.java +++ b/src/main/java/org/redisson/core/RHyperLogLog.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RHyperLogLogAsync.java b/src/main/java/org/redisson/core/RHyperLogLogAsync.java index 82e453664..d0020f9bf 100644 --- a/src/main/java/org/redisson/core/RHyperLogLogAsync.java +++ b/src/main/java/org/redisson/core/RHyperLogLogAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RKeys.java b/src/main/java/org/redisson/core/RKeys.java index 3aec7a1c9..fef6e64e5 100644 --- a/src/main/java/org/redisson/core/RKeys.java +++ b/src/main/java/org/redisson/core/RKeys.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RKeysAsync.java b/src/main/java/org/redisson/core/RKeysAsync.java index 591ccd945..6c0621b63 100644 --- a/src/main/java/org/redisson/core/RKeysAsync.java +++ b/src/main/java/org/redisson/core/RKeysAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RLexSortedSet.java b/src/main/java/org/redisson/core/RLexSortedSet.java index 407c01650..a547dd7b8 100644 --- a/src/main/java/org/redisson/core/RLexSortedSet.java +++ b/src/main/java/org/redisson/core/RLexSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RLexSortedSetAsync.java b/src/main/java/org/redisson/core/RLexSortedSetAsync.java index 42541bfa5..44ee4b585 100644 --- a/src/main/java/org/redisson/core/RLexSortedSetAsync.java +++ b/src/main/java/org/redisson/core/RLexSortedSetAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RList.java b/src/main/java/org/redisson/core/RList.java index fe865c142..b3428f5d9 100644 --- a/src/main/java/org/redisson/core/RList.java +++ b/src/main/java/org/redisson/core/RList.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RListAsync.java b/src/main/java/org/redisson/core/RListAsync.java index 49722b029..037e43fe6 100644 --- a/src/main/java/org/redisson/core/RListAsync.java +++ b/src/main/java/org/redisson/core/RListAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RListMultimap.java b/src/main/java/org/redisson/core/RListMultimap.java index b311cf2f8..4427bc1a6 100644 --- a/src/main/java/org/redisson/core/RListMultimap.java +++ b/src/main/java/org/redisson/core/RListMultimap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RListMultimapCache.java b/src/main/java/org/redisson/core/RListMultimapCache.java index 01d97baa5..7c6211195 100644 --- a/src/main/java/org/redisson/core/RListMultimapCache.java +++ b/src/main/java/org/redisson/core/RListMultimapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RLock.java b/src/main/java/org/redisson/core/RLock.java index 2ff50805d..0761492b7 100644 --- a/src/main/java/org/redisson/core/RLock.java +++ b/src/main/java/org/redisson/core/RLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -114,6 +114,8 @@ public interface RLock extends Lock, RExpirable { */ int getHoldCount(); + Future forceUnlockAsync(); + Future unlockAsync(); Future tryLockAsync(); diff --git a/src/main/java/org/redisson/core/RMap.java b/src/main/java/org/redisson/core/RMap.java index 635098ae9..5ff0f6235 100644 --- a/src/main/java/org/redisson/core/RMap.java +++ b/src/main/java/org/redisson/core/RMap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMapAsync.java b/src/main/java/org/redisson/core/RMapAsync.java index d6f52be79..74ede3462 100644 --- a/src/main/java/org/redisson/core/RMapAsync.java +++ b/src/main/java/org/redisson/core/RMapAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMapCache.java b/src/main/java/org/redisson/core/RMapCache.java index 8458ee83b..ec4d8dae4 100644 --- a/src/main/java/org/redisson/core/RMapCache.java +++ b/src/main/java/org/redisson/core/RMapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMapCacheAsync.java b/src/main/java/org/redisson/core/RMapCacheAsync.java index f5a8398b5..56a5b140d 100644 --- a/src/main/java/org/redisson/core/RMapCacheAsync.java +++ b/src/main/java/org/redisson/core/RMapCacheAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMultimap.java b/src/main/java/org/redisson/core/RMultimap.java index 338bcc9c6..bea37c349 100644 --- a/src/main/java/org/redisson/core/RMultimap.java +++ b/src/main/java/org/redisson/core/RMultimap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMultimapAsync.java b/src/main/java/org/redisson/core/RMultimapAsync.java index b9710df71..57bda3025 100644 --- a/src/main/java/org/redisson/core/RMultimapAsync.java +++ b/src/main/java/org/redisson/core/RMultimapAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMultimapCache.java b/src/main/java/org/redisson/core/RMultimapCache.java index 7fc06a11a..6387d2f7a 100644 --- a/src/main/java/org/redisson/core/RMultimapCache.java +++ b/src/main/java/org/redisson/core/RMultimapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RMultimapCacheAsync.java b/src/main/java/org/redisson/core/RMultimapCacheAsync.java index e910a7405..93e1f155d 100644 --- a/src/main/java/org/redisson/core/RMultimapCacheAsync.java +++ b/src/main/java/org/redisson/core/RMultimapCacheAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RObject.java b/src/main/java/org/redisson/core/RObject.java index fd1d972e1..5ada2557e 100644 --- a/src/main/java/org/redisson/core/RObject.java +++ b/src/main/java/org/redisson/core/RObject.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RObjectAsync.java b/src/main/java/org/redisson/core/RObjectAsync.java index f5b29fe38..bb7f11d87 100644 --- a/src/main/java/org/redisson/core/RObjectAsync.java +++ b/src/main/java/org/redisson/core/RObjectAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RPatternTopic.java b/src/main/java/org/redisson/core/RPatternTopic.java index de79287db..4ad5feb91 100644 --- a/src/main/java/org/redisson/core/RPatternTopic.java +++ b/src/main/java/org/redisson/core/RPatternTopic.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RQueue.java b/src/main/java/org/redisson/core/RQueue.java index bd8708e97..3a390f4ac 100644 --- a/src/main/java/org/redisson/core/RQueue.java +++ b/src/main/java/org/redisson/core/RQueue.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RQueueAsync.java b/src/main/java/org/redisson/core/RQueueAsync.java index bac65cca7..900cb09e3 100644 --- a/src/main/java/org/redisson/core/RQueueAsync.java +++ b/src/main/java/org/redisson/core/RQueueAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RReadWriteLock.java b/src/main/java/org/redisson/core/RReadWriteLock.java index 0a6bc1464..e5491a5a2 100644 --- a/src/main/java/org/redisson/core/RReadWriteLock.java +++ b/src/main/java/org/redisson/core/RReadWriteLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RRemoteService.java b/src/main/java/org/redisson/core/RRemoteService.java index 1980cbfff..0de1a67ee 100644 --- a/src/main/java/org/redisson/core/RRemoteService.java +++ b/src/main/java/org/redisson/core/RRemoteService.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RScoredSortedSet.java b/src/main/java/org/redisson/core/RScoredSortedSet.java index 6898fe2be..6643f4af5 100644 --- a/src/main/java/org/redisson/core/RScoredSortedSet.java +++ b/src/main/java/org/redisson/core/RScoredSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RScoredSortedSetAsync.java b/src/main/java/org/redisson/core/RScoredSortedSetAsync.java index f2b1ffc10..1572531bf 100644 --- a/src/main/java/org/redisson/core/RScoredSortedSetAsync.java +++ b/src/main/java/org/redisson/core/RScoredSortedSetAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RScript.java b/src/main/java/org/redisson/core/RScript.java index 47c560e05..2f36a5426 100644 --- a/src/main/java/org/redisson/core/RScript.java +++ b/src/main/java/org/redisson/core/RScript.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RScriptAsync.java b/src/main/java/org/redisson/core/RScriptAsync.java index e712abacf..bbdaae027 100644 --- a/src/main/java/org/redisson/core/RScriptAsync.java +++ b/src/main/java/org/redisson/core/RScriptAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSemaphore.java b/src/main/java/org/redisson/core/RSemaphore.java index 7d0ddaf85..ec9c05a33 100644 --- a/src/main/java/org/redisson/core/RSemaphore.java +++ b/src/main/java/org/redisson/core/RSemaphore.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSemaphoreAsync.java b/src/main/java/org/redisson/core/RSemaphoreAsync.java index a39175449..98a1510dd 100644 --- a/src/main/java/org/redisson/core/RSemaphoreAsync.java +++ b/src/main/java/org/redisson/core/RSemaphoreAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSet.java b/src/main/java/org/redisson/core/RSet.java index 316a1c6ff..8b78d28be 100644 --- a/src/main/java/org/redisson/core/RSet.java +++ b/src/main/java/org/redisson/core/RSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSetAsync.java b/src/main/java/org/redisson/core/RSetAsync.java index 214bebc7d..922f639b5 100644 --- a/src/main/java/org/redisson/core/RSetAsync.java +++ b/src/main/java/org/redisson/core/RSetAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSetCache.java b/src/main/java/org/redisson/core/RSetCache.java index 902cb3493..2da1a9fcf 100644 --- a/src/main/java/org/redisson/core/RSetCache.java +++ b/src/main/java/org/redisson/core/RSetCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSetCacheAsync.java b/src/main/java/org/redisson/core/RSetCacheAsync.java index 064b03897..f9059206f 100644 --- a/src/main/java/org/redisson/core/RSetCacheAsync.java +++ b/src/main/java/org/redisson/core/RSetCacheAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSetMultimap.java b/src/main/java/org/redisson/core/RSetMultimap.java index b9a2f5871..66a350e0a 100644 --- a/src/main/java/org/redisson/core/RSetMultimap.java +++ b/src/main/java/org/redisson/core/RSetMultimap.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSetMultimapCache.java b/src/main/java/org/redisson/core/RSetMultimapCache.java index 1029b2c3f..e196846a3 100644 --- a/src/main/java/org/redisson/core/RSetMultimapCache.java +++ b/src/main/java/org/redisson/core/RSetMultimapCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RSortedSet.java b/src/main/java/org/redisson/core/RSortedSet.java index 09b1d64e9..2f6097dc2 100644 --- a/src/main/java/org/redisson/core/RSortedSet.java +++ b/src/main/java/org/redisson/core/RSortedSet.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RTopic.java b/src/main/java/org/redisson/core/RTopic.java index a15ef29ed..f208a7ba7 100644 --- a/src/main/java/org/redisson/core/RTopic.java +++ b/src/main/java/org/redisson/core/RTopic.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RTopicAsync.java b/src/main/java/org/redisson/core/RTopicAsync.java index 1bef072e5..6499b5f87 100644 --- a/src/main/java/org/redisson/core/RTopicAsync.java +++ b/src/main/java/org/redisson/core/RTopicAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RType.java b/src/main/java/org/redisson/core/RType.java index 2d32a1fab..32a616229 100644 --- a/src/main/java/org/redisson/core/RType.java +++ b/src/main/java/org/redisson/core/RType.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/RedissonMultiLock.java b/src/main/java/org/redisson/core/RedissonMultiLock.java index ad1465dd8..404130680 100644 --- a/src/main/java/org/redisson/core/RedissonMultiLock.java +++ b/src/main/java/org/redisson/core/RedissonMultiLock.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,13 @@ package org.redisson.core; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Queue; +import java.util.Map.Entry; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -34,7 +38,7 @@ import io.netty.util.concurrent.ImmediateEventExecutor; import io.netty.util.concurrent.Promise; /** - * Groups multiple independent locks and handles them as one lock. + * Groups multiple independent locks and manages them as one lock. * * @author Nikita Koksharov * @@ -42,7 +46,7 @@ import io.netty.util.concurrent.Promise; public class RedissonMultiLock implements Lock { final List locks = new ArrayList(); - + /** * Creates instance with multiple {@link RLock} objects. * Each RLock object could be created by own Redisson instance. @@ -55,7 +59,7 @@ public class RedissonMultiLock implements Lock { } this.locks.addAll(Arrays.asList(locks)); } - + @Override public void lock() { try { @@ -76,8 +80,9 @@ public class RedissonMultiLock implements Lock { public void lockInterruptibly(long leaseTime, TimeUnit unit) throws InterruptedException { Promise promise = ImmediateEventExecutor.INSTANCE.newPromise(); - long currentThreadId = Thread.currentThread().getId(); - lock(promise, 0, leaseTime, unit, locks, currentThreadId); + long currentThreadId = Thread.currentThread().getId(); + Queue lockedLocks = new ConcurrentLinkedQueue(); + lock(promise, 0, leaseTime, unit, locks, currentThreadId, lockedLocks); promise.sync(); } @@ -87,7 +92,8 @@ public class RedissonMultiLock implements Lock { lockInterruptibly(-1, null); } - private void lock(final Promise promise, final long waitTime, final long leaseTime, final TimeUnit unit, final List locks, final long currentThreadId) throws InterruptedException { + private void lock(final Promise promise, final long waitTime, final long leaseTime, final TimeUnit unit, + final List locks, final long currentThreadId, final Queue lockedLocks) throws InterruptedException { final AtomicInteger tryLockRequestsAmount = new AtomicInteger(); final Map, RLock> tryLockFutures = new HashMap, RLock>(locks.size()); @@ -98,59 +104,73 @@ public class RedissonMultiLock implements Lock { @Override public void operationComplete(final Future future) throws Exception { - if (!future.isSuccess()) { + if (isLockFailed(future)) { failed.compareAndSet(null, future.cause()); } Boolean res = future.getNow(); - if (res != null && !res) { + if (res != null) { RLock lock = tryLockFutures.get(future); - lockedLockHolder.compareAndSet(null, lock); + if (res) { + lockedLocks.add(lock); + } else { + lockedLockHolder.compareAndSet(null, lock); + } } if (tryLockRequestsAmount.decrementAndGet() == 0) { - if (lockedLockHolder.get() == null && failed.get() == null) { + if (isAllLocksAcquired(lockedLockHolder, failed, lockedLocks)) { promise.setSuccess(null); return; } - tryLockRequestsAmount.set(tryLockFutures.size()); - for (RLock lock : tryLockFutures.values()) { + if (lockedLocks.isEmpty()) { + tryLockAgain(promise, waitTime, leaseTime, unit, currentThreadId, tryLockFutures); + return; + } + + final AtomicInteger locksToUnlockAmount = new AtomicInteger(lockedLocks.size()); + for (RLock lock : lockedLocks) { lock.unlockAsync().addListener(new FutureListener() { @Override public void operationComplete(Future future) throws Exception { - if (tryLockRequestsAmount.decrementAndGet() == 0) { - if (failed.get() != null) { - promise.setFailure(failed.get()); - } else if (lockedLockHolder.get() != null) { - final RedissonLock lockedLock = (RedissonLock) lockedLockHolder.get(); - lockedLock.lockAsync(leaseTime, unit, currentThreadId).addListener(new FutureListener() { - @Override - public void operationComplete(Future future) throws Exception { - if (!future.isSuccess()) { - promise.setFailure(future.cause()); - return; - } - - List newLocks = new ArrayList(tryLockFutures.values()); - newLocks.remove(lockedLock); - lock(promise, waitTime, leaseTime, unit, newLocks, currentThreadId); - } - }); - } + if (locksToUnlockAmount.decrementAndGet() == 0) { + tryLockAgain(promise, waitTime, leaseTime, unit, currentThreadId, tryLockFutures); } } }); } } } - }; - for (RLock lock : locks) { - if (lock.isHeldByCurrentThread()) { - continue; + protected void tryLockAgain(final Promise promise, final long waitTime, final long leaseTime, + final TimeUnit unit, final long currentThreadId, final Map, RLock> tryLockFutures) throws InterruptedException { + lockedLocks.clear(); + if (failed.get() != null) { + promise.setFailure(failed.get()); + } else if (lockedLockHolder.get() != null) { + final RedissonLock lockedLock = (RedissonLock) lockedLockHolder.get(); + lockedLock.lockAsync(leaseTime, unit, currentThreadId).addListener(new FutureListener() { + @Override + public void operationComplete(Future future) throws Exception { + if (!future.isSuccess()) { + promise.setFailure(future.cause()); + return; + } + + lockedLocks.add(lockedLock); + List newLocks = new ArrayList(tryLockFutures.values()); + newLocks.remove(lockedLock); + lock(promise, waitTime, leaseTime, unit, newLocks, currentThreadId, lockedLocks); + } + }); + } else { + lock(promise, waitTime, leaseTime, unit, locks, currentThreadId, lockedLocks); + } } + }; + for (RLock lock : locks) { tryLockRequestsAmount.incrementAndGet(); Future future; if (waitTime > 0 || leaseTime > 0) { @@ -168,27 +188,39 @@ public class RedissonMultiLock implements Lock { @Override public boolean tryLock() { - List> tryLockFutures = new ArrayList>(locks.size()); + Map> tryLockFutures = new HashMap>(locks.size()); for (RLock lock : locks) { - tryLockFutures.add(lock.tryLockAsync()); + tryLockFutures.put(lock, lock.tryLockAsync()); } - for (Future future : tryLockFutures) { + return sync(tryLockFutures); + } + + protected boolean sync(Map> tryLockFutures) { + List lockedLocks = new ArrayList(tryLockFutures.size()); + RuntimeException latestException = null; + for (Entry> entry : tryLockFutures.entrySet()) { try { - if (!future.syncUninterruptibly().getNow()) { - unlockInner(); - return false; + if (entry.getValue().syncUninterruptibly().getNow()) { + lockedLocks.add(entry.getKey()); } } catch (RuntimeException e) { - unlockInner(); - throw e; + latestException = e; } } - + + if (lockedLocks.size() < tryLockFutures.size()) { + unlockInner(lockedLocks); + if (latestException != null) { + throw latestException; + } + return false; + } + return true; } - private void unlockInner() { + protected void unlockInner(Collection locks) { List> futures = new ArrayList>(locks.size()); for (RLock lock : locks) { futures.add(lock.unlockAsync()); @@ -205,24 +237,12 @@ public class RedissonMultiLock implements Lock { } public boolean tryLock(long waitTime, long leaseTime, TimeUnit unit) throws InterruptedException { - List> tryLockFutures = new ArrayList>(locks.size()); + Map> tryLockFutures = new HashMap>(locks.size()); for (RLock lock : locks) { - tryLockFutures.add(lock.tryLockAsync(waitTime, leaseTime, unit)); + tryLockFutures.put(lock, lock.tryLockAsync(waitTime, leaseTime, unit)); } - for (Future future : tryLockFutures) { - try { - if (!future.syncUninterruptibly().getNow()) { - unlockInner(); - return false; - } - } catch (RuntimeException e) { - unlockInner(); - throw e; - } - } - - return true; + return sync(tryLockFutures); } @@ -245,4 +265,12 @@ public class RedissonMultiLock implements Lock { throw new UnsupportedOperationException(); } + protected boolean isLockFailed(Future future) { + return !future.isSuccess(); + } + + protected boolean isAllLocksAcquired(AtomicReference lockedLockHolder, AtomicReference failed, Queue lockedLocks) { + return lockedLockHolder.get() == null && failed.get() == null; + } + } diff --git a/src/main/java/org/redisson/core/RedissonRedLock.java b/src/main/java/org/redisson/core/RedissonRedLock.java new file mode 100644 index 000000000..441d23a74 --- /dev/null +++ b/src/main/java/org/redisson/core/RedissonRedLock.java @@ -0,0 +1,86 @@ +/** + * Copyright 2016 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.core; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Queue; +import java.util.concurrent.atomic.AtomicReference; + +import io.netty.util.concurrent.Future; + +/** + * RedLock locking algorithm implementation for multiple locks. + * It manages all locks as one. + * + * @see http://redis.io/topics/distlock + * + * @author Nikita Koksharov + * + */ +public class RedissonRedLock extends RedissonMultiLock { + + /** + * Creates instance with multiple {@link RLock} objects. + * Each RLock object could be created by own Redisson instance. + * + * @param locks + */ + public RedissonRedLock(RLock... locks) { + super(locks); + } + + protected boolean sync(Map> tryLockFutures) { + List lockedLocks = new ArrayList(tryLockFutures.size()); + RuntimeException latestException = null; + for (Entry> entry : tryLockFutures.entrySet()) { + try { + if (entry.getValue().syncUninterruptibly().getNow()) { + lockedLocks.add(entry.getKey()); + } + } catch (RuntimeException e) { + latestException = e; + } + } + + if (lockedLocks.size() < minLocksAmount(locks)) { + unlockInner(lockedLocks); + if (latestException != null) { + throw latestException; + } + return false; + } + + return true; + } + + protected int minLocksAmount(final List locks) { + return locks.size()/2 + 1; + } + + @Override + protected boolean isLockFailed(Future future) { + return false; + } + + @Override + protected boolean isAllLocksAcquired(AtomicReference lockedLockHolder, AtomicReference failed, Queue lockedLocks) { + return (lockedLockHolder.get() == null && failed.get() == null) || lockedLocks.size() >= minLocksAmount(locks); + } + +} diff --git a/src/main/java/org/redisson/core/RemoteInvocationOptions.java b/src/main/java/org/redisson/core/RemoteInvocationOptions.java index 265ea81a6..f8d5be9e4 100644 --- a/src/main/java/org/redisson/core/RemoteInvocationOptions.java +++ b/src/main/java/org/redisson/core/RemoteInvocationOptions.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/core/StatusListener.java b/src/main/java/org/redisson/core/StatusListener.java index 8cefc661c..2745d2f91 100644 --- a/src/main/java/org/redisson/core/StatusListener.java +++ b/src/main/java/org/redisson/core/StatusListener.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/misc/CompositeIterable.java b/src/main/java/org/redisson/misc/CompositeIterable.java index 2f871eb09..c7a92e218 100644 --- a/src/main/java/org/redisson/misc/CompositeIterable.java +++ b/src/main/java/org/redisson/misc/CompositeIterable.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/misc/Hash.java b/src/main/java/org/redisson/misc/Hash.java index e259bdf77..03fce6b90 100644 --- a/src/main/java/org/redisson/misc/Hash.java +++ b/src/main/java/org/redisson/misc/Hash.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/misc/InfinitySemaphoreLatch.java b/src/main/java/org/redisson/misc/InfinitySemaphoreLatch.java index e737cd711..faebfb1f2 100644 --- a/src/main/java/org/redisson/misc/InfinitySemaphoreLatch.java +++ b/src/main/java/org/redisson/misc/InfinitySemaphoreLatch.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/misc/ReclosableLatch.java b/src/main/java/org/redisson/misc/ReclosableLatch.java index a7d165cf9..976ffc80f 100644 --- a/src/main/java/org/redisson/misc/ReclosableLatch.java +++ b/src/main/java/org/redisson/misc/ReclosableLatch.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/misc/URIBuilder.java b/src/main/java/org/redisson/misc/URIBuilder.java index 738f1fae8..aa956790d 100644 --- a/src/main/java/org/redisson/misc/URIBuilder.java +++ b/src/main/java/org/redisson/misc/URIBuilder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/pubsub/CountDownLatchPubSub.java b/src/main/java/org/redisson/pubsub/CountDownLatchPubSub.java index 9d923f8dc..998bfd6d4 100644 --- a/src/main/java/org/redisson/pubsub/CountDownLatchPubSub.java +++ b/src/main/java/org/redisson/pubsub/CountDownLatchPubSub.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/pubsub/LockPubSub.java b/src/main/java/org/redisson/pubsub/LockPubSub.java index 4632cabae..04ed5b47c 100644 --- a/src/main/java/org/redisson/pubsub/LockPubSub.java +++ b/src/main/java/org/redisson/pubsub/LockPubSub.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/pubsub/PublishSubscribe.java b/src/main/java/org/redisson/pubsub/PublishSubscribe.java index 96ec6fb7b..a2c18c24d 100644 --- a/src/main/java/org/redisson/pubsub/PublishSubscribe.java +++ b/src/main/java/org/redisson/pubsub/PublishSubscribe.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/pubsub/SemaphorePubSub.java b/src/main/java/org/redisson/pubsub/SemaphorePubSub.java index 08054649d..84ca12807 100644 --- a/src/main/java/org/redisson/pubsub/SemaphorePubSub.java +++ b/src/main/java/org/redisson/pubsub/SemaphorePubSub.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/NettyFuturePublisher.java b/src/main/java/org/redisson/reactive/NettyFuturePublisher.java index 4a10d27d0..971a277e4 100644 --- a/src/main/java/org/redisson/reactive/NettyFuturePublisher.java +++ b/src/main/java/org/redisson/reactive/NettyFuturePublisher.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/PublisherAdder.java b/src/main/java/org/redisson/reactive/PublisherAdder.java index a7ca9b907..9c089641a 100644 --- a/src/main/java/org/redisson/reactive/PublisherAdder.java +++ b/src/main/java/org/redisson/reactive/PublisherAdder.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonAtomicLongReactive.java b/src/main/java/org/redisson/reactive/RedissonAtomicLongReactive.java index 7132b1822..8bbcfb96f 100644 --- a/src/main/java/org/redisson/reactive/RedissonAtomicLongReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonAtomicLongReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonBatchReactive.java b/src/main/java/org/redisson/reactive/RedissonBatchReactive.java index 17c282323..8696d6824 100644 --- a/src/main/java/org/redisson/reactive/RedissonBatchReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonBatchReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonBitSetReactive.java b/src/main/java/org/redisson/reactive/RedissonBitSetReactive.java index 1396b6b79..a11a314fa 100644 --- a/src/main/java/org/redisson/reactive/RedissonBitSetReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonBitSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonBlockingQueueReactive.java b/src/main/java/org/redisson/reactive/RedissonBlockingQueueReactive.java index c729e37e7..c31869450 100644 --- a/src/main/java/org/redisson/reactive/RedissonBlockingQueueReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonBlockingQueueReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonBucketReactive.java b/src/main/java/org/redisson/reactive/RedissonBucketReactive.java index ef1c4cb38..50536c832 100644 --- a/src/main/java/org/redisson/reactive/RedissonBucketReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonBucketReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonDequeReactive.java b/src/main/java/org/redisson/reactive/RedissonDequeReactive.java index aeeebb067..6b6dd9f66 100644 --- a/src/main/java/org/redisson/reactive/RedissonDequeReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonDequeReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonExpirableReactive.java b/src/main/java/org/redisson/reactive/RedissonExpirableReactive.java index a70faa029..c87d53706 100644 --- a/src/main/java/org/redisson/reactive/RedissonExpirableReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonExpirableReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonHyperLogLogReactive.java b/src/main/java/org/redisson/reactive/RedissonHyperLogLogReactive.java index 211716f9e..2d2b1b684 100644 --- a/src/main/java/org/redisson/reactive/RedissonHyperLogLogReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonHyperLogLogReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonKeysReactive.java b/src/main/java/org/redisson/reactive/RedissonKeysReactive.java index 51c687f16..74c9b9764 100644 --- a/src/main/java/org/redisson/reactive/RedissonKeysReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonKeysReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonLexSortedSetReactive.java b/src/main/java/org/redisson/reactive/RedissonLexSortedSetReactive.java index 7cdc6480f..3859ee2df 100644 --- a/src/main/java/org/redisson/reactive/RedissonLexSortedSetReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonLexSortedSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonListReactive.java b/src/main/java/org/redisson/reactive/RedissonListReactive.java index d33213308..df4fc68b0 100644 --- a/src/main/java/org/redisson/reactive/RedissonListReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonListReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonMapCacheReactive.java b/src/main/java/org/redisson/reactive/RedissonMapCacheReactive.java index 85acad239..c7cd7e829 100644 --- a/src/main/java/org/redisson/reactive/RedissonMapCacheReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonMapCacheReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonMapReactive.java b/src/main/java/org/redisson/reactive/RedissonMapReactive.java index f33123932..4c882f5ec 100644 --- a/src/main/java/org/redisson/reactive/RedissonMapReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonMapReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonMapReactiveIterator.java b/src/main/java/org/redisson/reactive/RedissonMapReactiveIterator.java index 3f997b3af..3cb7677ba 100644 --- a/src/main/java/org/redisson/reactive/RedissonMapReactiveIterator.java +++ b/src/main/java/org/redisson/reactive/RedissonMapReactiveIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonObjectReactive.java b/src/main/java/org/redisson/reactive/RedissonObjectReactive.java index 63aa6bb90..7931af3de 100644 --- a/src/main/java/org/redisson/reactive/RedissonObjectReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonObjectReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonPatternTopicReactive.java b/src/main/java/org/redisson/reactive/RedissonPatternTopicReactive.java index d2a44ff59..60d1fd054 100644 --- a/src/main/java/org/redisson/reactive/RedissonPatternTopicReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonPatternTopicReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonQueueReactive.java b/src/main/java/org/redisson/reactive/RedissonQueueReactive.java index ec998411e..83ce82152 100644 --- a/src/main/java/org/redisson/reactive/RedissonQueueReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonQueueReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java b/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java index fec4044b4..927b4056d 100644 --- a/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonScoredSortedSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonScriptReactive.java b/src/main/java/org/redisson/reactive/RedissonScriptReactive.java index f50b13e4f..c4c273b34 100644 --- a/src/main/java/org/redisson/reactive/RedissonScriptReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonScriptReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java b/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java index 52c90959f..2717981f2 100644 --- a/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonSetCacheReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonSetReactive.java b/src/main/java/org/redisson/reactive/RedissonSetReactive.java index 17564e6a0..9f5fe1098 100644 --- a/src/main/java/org/redisson/reactive/RedissonSetReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonSetReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/RedissonTopicReactive.java b/src/main/java/org/redisson/reactive/RedissonTopicReactive.java index 5283d4dab..b98949336 100644 --- a/src/main/java/org/redisson/reactive/RedissonTopicReactive.java +++ b/src/main/java/org/redisson/reactive/RedissonTopicReactive.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/reactive/SetReactiveIterator.java b/src/main/java/org/redisson/reactive/SetReactiveIterator.java index a5d78573d..787866822 100644 --- a/src/main/java/org/redisson/reactive/SetReactiveIterator.java +++ b/src/main/java/org/redisson/reactive/SetReactiveIterator.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RRemoteAsync.java b/src/main/java/org/redisson/remote/RRemoteAsync.java index 4b74d67ab..22596ef5a 100644 --- a/src/main/java/org/redisson/remote/RRemoteAsync.java +++ b/src/main/java/org/redisson/remote/RRemoteAsync.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RRemoteServiceResponse.java b/src/main/java/org/redisson/remote/RRemoteServiceResponse.java index 57d20b670..44a72d231 100644 --- a/src/main/java/org/redisson/remote/RRemoteServiceResponse.java +++ b/src/main/java/org/redisson/remote/RRemoteServiceResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceAck.java b/src/main/java/org/redisson/remote/RemoteServiceAck.java index ccfa1680f..da496efe6 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceAck.java +++ b/src/main/java/org/redisson/remote/RemoteServiceAck.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceAckTimeoutException.java b/src/main/java/org/redisson/remote/RemoteServiceAckTimeoutException.java index 566fc61b9..b6149a146 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceAckTimeoutException.java +++ b/src/main/java/org/redisson/remote/RemoteServiceAckTimeoutException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceKey.java b/src/main/java/org/redisson/remote/RemoteServiceKey.java index 20f7ea9ff..995180076 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceKey.java +++ b/src/main/java/org/redisson/remote/RemoteServiceKey.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceMethod.java b/src/main/java/org/redisson/remote/RemoteServiceMethod.java index 26998214f..3769990fa 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceMethod.java +++ b/src/main/java/org/redisson/remote/RemoteServiceMethod.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceRequest.java b/src/main/java/org/redisson/remote/RemoteServiceRequest.java index adc4267f8..f48c6292e 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceRequest.java +++ b/src/main/java/org/redisson/remote/RemoteServiceRequest.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceResponse.java b/src/main/java/org/redisson/remote/RemoteServiceResponse.java index d6e03ae61..fb9aff160 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceResponse.java +++ b/src/main/java/org/redisson/remote/RemoteServiceResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/remote/RemoteServiceTimeoutException.java b/src/main/java/org/redisson/remote/RemoteServiceTimeoutException.java index b5d5720c0..ffdec867f 100644 --- a/src/main/java/org/redisson/remote/RemoteServiceTimeoutException.java +++ b/src/main/java/org/redisson/remote/RemoteServiceTimeoutException.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/spring/cache/CacheConfig.java b/src/main/java/org/redisson/spring/cache/CacheConfig.java index ce947a6c0..89ff64f0f 100644 --- a/src/main/java/org/redisson/spring/cache/CacheConfig.java +++ b/src/main/java/org/redisson/spring/cache/CacheConfig.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/spring/cache/CacheConfigSupport.java b/src/main/java/org/redisson/spring/cache/CacheConfigSupport.java index 840101d64..fa7534278 100644 --- a/src/main/java/org/redisson/spring/cache/CacheConfigSupport.java +++ b/src/main/java/org/redisson/spring/cache/CacheConfigSupport.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/spring/cache/NullValue.java b/src/main/java/org/redisson/spring/cache/NullValue.java index b4181b48f..374dca3cf 100644 --- a/src/main/java/org/redisson/spring/cache/NullValue.java +++ b/src/main/java/org/redisson/spring/cache/NullValue.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/spring/cache/RedissonCache.java b/src/main/java/org/redisson/spring/cache/RedissonCache.java index 31efe95a9..5a02fe51c 100644 --- a/src/main/java/org/redisson/spring/cache/RedissonCache.java +++ b/src/main/java/org/redisson/spring/cache/RedissonCache.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java b/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java index 9f9166e2d..16430eb63 100644 --- a/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java +++ b/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java @@ -1,5 +1,5 @@ /** - * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/redisson/RedissonMultiLockTest.java b/src/test/java/org/redisson/RedissonMultiLockTest.java index 62af6b0e8..359036c0b 100644 --- a/src/test/java/org/redisson/RedissonMultiLockTest.java +++ b/src/test/java/org/redisson/RedissonMultiLockTest.java @@ -17,7 +17,7 @@ public class RedissonMultiLockTest { @Test public void testMultiThreads() throws IOException, InterruptedException { - RedisProcess redis1 = redisTestMultilockInstance1(); + RedisProcess redis1 = redisTestMultilockInstance(6320); Config config1 = new Config(); config1.useSingleServer().setAddress("127.0.0.1:6320"); @@ -52,28 +52,15 @@ public class RedissonMultiLockTest { @Test public void test() throws IOException, InterruptedException { - RedisProcess redis1 = redisTestMultilockInstance1(); - RedisProcess redis2 = redisTestMultilockInstance2(); - RedisProcess redis3 = redisTestMultilockInstance3(); + RedisProcess redis1 = redisTestMultilockInstance(6320); + RedisProcess redis2 = redisTestMultilockInstance(6321); + RedisProcess redis3 = redisTestMultilockInstance(6322); NioEventLoopGroup group = new NioEventLoopGroup(); - Config config1 = new Config(); - config1.useSingleServer().setAddress("127.0.0.1:6320"); - config1.setEventLoopGroup(group); - RedissonClient client1 = Redisson.create(config1); - client1.getKeys().flushdb(); - - Config config2 = new Config(); - config2.useSingleServer().setAddress("127.0.0.1:6321"); - config2.setEventLoopGroup(group); - RedissonClient client2 = Redisson.create(config2); - client2.getKeys().flushdb(); - - Config config3 = new Config(); - config3.useSingleServer().setAddress("127.0.0.1:6322"); - config3.setEventLoopGroup(group); - RedissonClient client3 = Redisson.create(config3); - client3.getKeys().flushdb(); + + RedissonClient client1 = createClient(group, "127.0.0.1:6320"); + RedissonClient client2 = createClient(group, "127.0.0.1:6321"); + RedissonClient client3 = createClient(group, "127.0.0.1:6322"); final RLock lock1 = client1.getLock("lock1"); final RLock lock2 = client2.getLock("lock2"); @@ -106,28 +93,26 @@ public class RedissonMultiLockTest { assertThat(redis3.stop()).isEqualTo(0); } - - private RedisProcess redisTestMultilockInstance1() throws IOException, InterruptedException { - return new RedisRunner() - .nosave() - .randomDir() - .port(6320) - .run(); + + private RedissonClient createClient(String host) { + return createClient(null, host); } - - private RedisProcess redisTestMultilockInstance2() throws IOException, InterruptedException { - return new RedisRunner() - .nosave() - .randomDir() - .port(6321) - .run(); + + private RedissonClient createClient(NioEventLoopGroup group, String host) { + Config config1 = new Config(); + config1.useSingleServer().setAddress(host); + config1.setEventLoopGroup(group); + RedissonClient client1 = Redisson.create(config1); + client1.getKeys().flushdb(); + return client1; } - private RedisProcess redisTestMultilockInstance3() throws IOException, InterruptedException { + private RedisProcess redisTestMultilockInstance(int port) throws IOException, InterruptedException { return new RedisRunner() .nosave() .randomDir() - .port(6322) + .port(port) .run(); } + } diff --git a/src/test/java/org/redisson/RedissonRedLockTest.java b/src/test/java/org/redisson/RedissonRedLockTest.java new file mode 100644 index 000000000..5fe975077 --- /dev/null +++ b/src/test/java/org/redisson/RedissonRedLockTest.java @@ -0,0 +1,248 @@ +package org.redisson; + +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.junit.Assert; +import org.junit.Test; +import org.redisson.core.RLock; +import org.redisson.core.RedissonMultiLock; +import org.redisson.core.RedissonRedLock; + +import io.netty.channel.nio.NioEventLoopGroup; + +import org.redisson.RedisRunner.RedisProcess; +import static com.jayway.awaitility.Awaitility.await; +import static org.assertj.core.api.Assertions.assertThat; + +public class RedissonRedLockTest { + + @Test + public void testLockFailed() throws IOException, InterruptedException { + RedisProcess redis1 = redisTestMultilockInstance(6320); + RedisProcess redis2 = redisTestMultilockInstance(6321); + + RedissonClient client1 = createClient("127.0.0.1:6320"); + RedissonClient client2 = createClient("127.0.0.1:6321"); + + RLock lock1 = client1.getLock("lock1"); + RLock lock2 = client1.getLock("lock2"); + RLock lock3 = client2.getLock("lock3"); + + Thread t1 = new Thread() { + public void run() { + lock2.lock(); + lock3.lock(); + }; + }; + t1.start(); + t1.join(); + + Thread t = new Thread() { + public void run() { + RedissonMultiLock lock = new RedissonRedLock(lock1, lock2, lock3); + lock.lock(); + + try { + Thread.sleep(3000); + } catch (InterruptedException e) { + } + + lock.unlock(); + }; + }; + t.start(); + t.join(1000); + + RedissonMultiLock lock = new RedissonRedLock(lock1, lock2, lock3); + Assert.assertFalse(lock.tryLock()); + + assertThat(redis1.stop()).isEqualTo(0); + assertThat(redis2.stop()).isEqualTo(0); + } + + + @Test + public void testLockSuccess() throws IOException, InterruptedException { + RedisProcess redis1 = redisTestMultilockInstance(6320); + RedisProcess redis2 = redisTestMultilockInstance(6321); + + RedissonClient client1 = createClient("127.0.0.1:6320"); + RedissonClient client2 = createClient("127.0.0.1:6321"); + + RLock lock1 = client1.getLock("lock1"); + RLock lock2 = client1.getLock("lock2"); + RLock lock3 = client2.getLock("lock3"); + + Thread t1 = new Thread() { + public void run() { + lock3.lock(); + }; + }; + t1.start(); + t1.join(); + + Thread t = new Thread() { + public void run() { + RedissonMultiLock lock = new RedissonRedLock(lock1, lock2, lock3); + lock.lock(); + + try { + Thread.sleep(3000); + } catch (InterruptedException e) { + } + + lock.unlock(); + }; + }; + t.start(); + t.join(1000); + + RedissonMultiLock lock = new RedissonRedLock(lock1, lock2, lock3); + lock.lock(); + lock.unlock(); + + assertThat(redis1.stop()).isEqualTo(0); + assertThat(redis2.stop()).isEqualTo(0); + } + + + @Test + public void testConnectionFailed() throws IOException, InterruptedException { + RedisProcess redis1 = redisTestMultilockInstance(6320); + RedisProcess redis2 = redisTestMultilockInstance(6321); + + RedissonClient client1 = createClient("127.0.0.1:6320"); + RedissonClient client2 = createClient("127.0.0.1:6321"); + + RLock lock1 = client1.getLock("lock1"); + RLock lock2 = client1.getLock("lock2"); + assertThat(redis2.stop()).isEqualTo(0); + RLock lock3 = client2.getLock("lock3"); + + Thread t = new Thread() { + public void run() { + RedissonMultiLock lock = new RedissonRedLock(lock1, lock2, lock3); + lock.lock(); + + try { + Thread.sleep(3000); + } catch (InterruptedException e) { + } + + lock.unlock(); + }; + }; + t.start(); + t.join(1000); + + RedissonMultiLock lock = new RedissonRedLock(lock1, lock2, lock3); + lock.lock(); + lock.unlock(); + + assertThat(redis1.stop()).isEqualTo(0); + } + + +// @Test + public void testMultiThreads() throws IOException, InterruptedException { + RedisProcess redis1 = redisTestMultilockInstance(6320); + + Config config1 = new Config(); + config1.useSingleServer().setAddress("127.0.0.1:6320"); + RedissonClient client = Redisson.create(config1); + + RLock lock1 = client.getLock("lock1"); + RLock lock2 = client.getLock("lock2"); + RLock lock3 = client.getLock("lock3"); + + Thread t = new Thread() { + public void run() { + RedissonMultiLock lock = new RedissonMultiLock(lock1, lock2, lock3); + lock.lock(); + + try { + Thread.sleep(3000); + } catch (InterruptedException e) { + } + + lock.unlock(); + }; + }; + t.start(); + t.join(1000); + + RedissonMultiLock lock = new RedissonMultiLock(lock1, lock2, lock3); + lock.lock(); + lock.unlock(); + + assertThat(redis1.stop()).isEqualTo(0); + } + +// @Test + public void test() throws IOException, InterruptedException { + RedisProcess redis1 = redisTestMultilockInstance(6320); + RedisProcess redis2 = redisTestMultilockInstance(6321); + RedisProcess redis3 = redisTestMultilockInstance(6322); + + NioEventLoopGroup group = new NioEventLoopGroup(); + + RedissonClient client1 = createClient(group, "127.0.0.1:6320"); + RedissonClient client2 = createClient(group, "127.0.0.1:6321"); + RedissonClient client3 = createClient(group, "127.0.0.1:6322"); + + final RLock lock1 = client1.getLock("lock1"); + final RLock lock2 = client2.getLock("lock2"); + final RLock lock3 = client3.getLock("lock3"); + + RedissonMultiLock lock = new RedissonMultiLock(lock1, lock2, lock3); + lock.lock(); + + final AtomicBoolean executed = new AtomicBoolean(); + + Thread t = new Thread() { + @Override + public void run() { + RedissonMultiLock lock = new RedissonMultiLock(lock1, lock2, lock3); + assertThat(lock.tryLock()).isFalse(); + assertThat(lock.tryLock()).isFalse(); + executed.set(true); + } + }; + t.start(); + t.join(); + + await().atMost(5, TimeUnit.SECONDS).until(() -> assertThat(executed.get()).isTrue()); + + lock.unlock(); + + assertThat(redis1.stop()).isEqualTo(0); + + assertThat(redis2.stop()).isEqualTo(0); + + assertThat(redis3.stop()).isEqualTo(0); + } + + private RedissonClient createClient(String host) { + return createClient(null, host); + } + + private RedissonClient createClient(NioEventLoopGroup group, String host) { + Config config1 = new Config(); + config1.useSingleServer().setAddress(host); + config1.setEventLoopGroup(group); + RedissonClient client1 = Redisson.create(config1); + client1.getKeys().flushdb(); + return client1; + } + + private RedisProcess redisTestMultilockInstance(int port) throws IOException, InterruptedException { + return new RedisRunner() + .nosave() + .randomDir() + .port(port) + .run(); + } + +}