@Override
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable {
try {
final boolean localNodeOwnsLock = cdl.localNodeIsPrimaryOwner(command.getKey());
acquireRemoteIfNeeded(ctx, command, localNodeOwnsLock);
final TxInvocationContext txContext = (TxInvocationContext) ctx;
boolean skipLocking = hasSkipLocking(command);
long lockTimeout = getLockAcquisitionTimeout(command, skipLocking);
lockAndRegisterBackupLock(txContext, command.getKey(),
localNodeOwnsLock, lockTimeout, skipLocking);
return invokeNextInterceptor(ctx, command);