DATAKV-67

+ removed ability to pass in custom template since that's not the case (as the backing format is predefined and custom serialization is not an option)
This commit is contained in:
Costin Leau
2011-04-28 19:03:15 +03:00
parent cb8fc22c45
commit 3c0bccf1d4
2 changed files with 0 additions and 73 deletions

View File

@@ -87,43 +87,6 @@ public class RedisAtomicInteger extends Number implements Serializable, BoundKey
}
}
/**
* Constructs a new <code>RedisAtomicInteger</code> instance. Uses as initial value
* the data from the backing store (sets the counter to 0 if no value is found).
*
* Use {@link #RedisAtomicInteger(String, RedisOperations, int)} to set the counter to a certain value
* as an alternative constructor or {@link #set(int)}.
*
* Note that integers need to be properly serialized so that Redis can recognized the values as numeric and thus modify their value.
*
* @param redisCounter
* @param operations
*/
public RedisAtomicInteger(String redisCounter, RedisOperations<String, Integer> operations) {
this.key = redisCounter;
this.operations = operations.opsForValue();
this.generalOps = operations;
if (this.operations.get(redisCounter) == null) {
set(0);
}
}
/**
* Constructs a new <code>RedisAtomicInteger</code> instance with the given initial value.
*
* Note that integers need to be properly serialized so that Redis can recognized the values as numeric and thus modify their value.
*
* @param redisCounter
* @param operations
* @param initialValue
*/
public RedisAtomicInteger(String redisCounter, RedisOperations<String, Integer> operations, int initialValue) {
this.key = redisCounter;
this.operations = operations.opsForValue();
this.generalOps = operations;
this.operations.set(redisCounter, initialValue);
}
/**
* Get the current value.
*

View File

@@ -87,42 +87,6 @@ public class RedisAtomicLong extends Number implements Serializable, BoundKeyOpe
}
}
/**
* Constructs a new <code>RedisAtomicLong</code> instance. Uses as initial value
* the data from the backing store (sets the counter to 0 if no value is found).
*
* Use {@link #RedisAtomicLong(String, RedisOperations, long)} to set the counter to a certain value
* as an alternative constructor or {@link #set(long)}.
*
* Note that longs need to be properly serialized so that Redis can recognized the values as numeric and thus modify their value.
*
* @param redisCounter
* @param operations
*/
public RedisAtomicLong(String redisCounter, RedisOperations<String, Long> operations) {
this.key = redisCounter;
this.operations = operations.opsForValue();
this.generalOps = operations;
if (this.operations.get(redisCounter) == null) {
set(0);
}
}
/**
* Constructs a new <code>RedisAtomicLong</code> instance with the given initial value.
*
* Note that longs need to be properly serialized so that Redis can recognized the values as numeric and thus modify their value.
*
* @param redisCounter
* @param operations
* @param initialValue
*/
public RedisAtomicLong(String redisCounter, RedisOperations<String, Long> operations, long initialValue) {
this.key = redisCounter;
this.operations = operations.opsForValue();
this.operations.set(redisCounter, initialValue);
}
/**
* Gets the current value.
*