Skip to content

Commit

Permalink
Make use of the supplied expiration date in CASMutator.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin committed Mar 19, 2008
1 parent 8d4dd42 commit 66404fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/spy/memcached/CASMutator.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public CASMutator(MemcachedClient c, Transcoder<T> tc) {
* key
* @return the new value that was set
*/
public T cas(final String key, final T initial, long initialExp,
public T cas(final String key, final T initial, int initialExp,
final CASMutation<T> m) throws Exception {
T rv=initial;

Expand Down Expand Up @@ -102,7 +102,7 @@ public T cas(final String key, final T initial, long initialExp,
}
} else {
// No value found, try an add.
if(client.add(key, 0, initial, transcoder).get()) {
if(client.add(key, initialExp, initial, transcoder).get()) {
done=true;
rv=initial;
}
Expand Down

0 comments on commit 66404fe

Please sign in to comment.