if (SET_METHOD.equals(method)) {
try {
MemcacheSetRequest.Builder builder =
MemcacheSetRequest.newBuilder().mergeFrom(requestBuf);
for (MemcacheSetRequest.Item item : builder.getItemList()) {
ByteString key = item.getKey();
memcacheKeys.add(key);
}
} catch (Exception e) {
ThrowableUtil.wrapAndThrow(e);
}
} else if (INCREMENT_METHOD.equals(method)) {
try {
MemcacheIncrementRequest.Builder builder =
MemcacheIncrementRequest.newBuilder().mergeFrom(
requestBuf);
ByteString key = builder.getKey();
memcacheKeys.add(key);
} catch (Exception e) {
ThrowableUtil.wrapAndThrow(e);
}
} else if (BATCH_INCREMENT_METHOD.equals(method)) {
try {
MemcacheBatchIncrementRequest.Builder builder =
MemcacheBatchIncrementRequest.newBuilder().mergeFrom(
requestBuf);
for (MemcacheIncrementRequest item : builder.getItemList()) {
ByteString key = item.getKey();
memcacheKeys.add(key);
}
} catch (Exception e) {
ThrowableUtil.wrapAndThrow(e);
}