@Override public void replaceLock(String taskid, TaskLock oldLock, TaskLock newLock) { Preconditions.checkNotNull(taskid, "taskid"); Preconditions.checkNotNull(oldLock, "oldLock"); Preconditions.checkNotNull(newLock, "newLock"); log.info( "Replacing an existing lock[%s] with a new lock[%s] for task: %s", oldLock, newLock, taskid ); final Long oldLockId = handler.getLockId(taskid, oldLock); if (oldLockId == null) { throw new ISE("Cannot find an existing lock[%s]", oldLock); } handler.replaceLock(taskid, oldLockId, newLock); }
@Override public void replaceLock(String taskid, TaskLock oldLock, TaskLock newLock) { Preconditions.checkNotNull(taskid, "taskid"); Preconditions.checkNotNull(oldLock, "oldLock"); Preconditions.checkNotNull(newLock, "newLock"); log.info( "Replacing an existing lock[%s] with a new lock[%s] for task: %s", oldLock, newLock, taskid ); final Long oldLockId = handler.getLockId(taskid, oldLock); if (oldLockId == null) { throw new ISE("Cannot find an existing lock[%s]", oldLock); } handler.replaceLock(taskid, oldLockId, newLock); }