polish up RedisAtomicInteger
This commit is contained in:
@@ -48,12 +48,12 @@ public class RedisAtomicInteger extends Number implements Serializable {
|
||||
*
|
||||
* @param redisCounter
|
||||
* @param commands
|
||||
* @param value
|
||||
* @param initialValue
|
||||
*/
|
||||
public RedisAtomicInteger(String redisCounter, RedisCommands commands, int value) {
|
||||
public RedisAtomicInteger(String redisCounter, RedisCommands commands, int initialValue) {
|
||||
this.key = redisCounter;
|
||||
this.commands = commands;
|
||||
commands.set(redisCounter, Integer.toString(value));
|
||||
commands.set(redisCounter, Integer.toString(initialValue));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,6 @@ public class RedisAtomicInteger extends Number implements Serializable {
|
||||
return Integer.valueOf(commands.getSet(key, Integer.toString(newValue)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Atomically set the value to the given updated value
|
||||
* if the current value <tt>==</tt> the expected value.
|
||||
|
||||
Reference in New Issue
Block a user