ensureArguments(args, 6, 6);
final RowLockRequest rlr = new RowLockRequest(args[2], args[3]);
lock = client.lockRow(rlr).joinUninterruptibly();
LOG.info("Acquired explicit row lock: " + lock);
}
final DeleteRequest delete;
if (lock == null) {
switch (args.length) {
case 4: delete = new DeleteRequest(args[2], args[3]); break;
case 5: delete = new DeleteRequest(args[2], args[3], args[4]); break;
case 6: delete = new DeleteRequest(args[2], args[3], args[4], args[5]); break;
default: throw new AssertionError("Should never be here");
}
} else {
delete = new DeleteRequest(args[2], args[3], args[4], args[5], lock);
}
args = null;
try {
final Object result = client.delete(delete).joinUninterruptibly();
LOG.info("Delete result=" + result);