"max tries must be greater than 0");
}
int tryCount = 0;
GetsResponse<T> result = getsResponse;
if (result == null) {
throw new MemcachedException("Null GetsResponse");
}
while (tryCount <= operation.getMaxTries()
&& result != null
&& !this.sendStoreCommand(this.commandFactory.createCASCommand(
key, keyBytes, exp, operation.getNewValue(result
.getCas(), result.getValue()), result.getCas(),
noreply, transcoder), this.opTimeout) && !noreply) {
tryCount++;
result = this.gets0(key, keyBytes, transcoder);
if (result == null) {
throw new MemcachedException(
"could not gets the value for Key=" + key + " for cas");
}
if (tryCount > operation.getMaxTries()) {
throw new TimeoutException("CAS try times is greater than max");
}