public IdentifiedDataSerializable createNew(Integer arg) { return new EntryOffloadableSetUnlockOperation(); } };
public EntryOffloadableSetUnlockOperation(String name, EntryEventType modificationType, Data key, Data oldValue, Data newValue, String caller, long threadId, long begin, EntryBackupProcessor entryBackupProcessor) { super(name, key, newValue); this.newValue = newValue; this.oldValue = oldValue; this.caller = caller; this.begin = begin; this.modificationType = modificationType; this.entryBackupProcessor = entryBackupProcessor; this.setThreadId(threadId); }
@SuppressWarnings({"unchecked", "checkstyle:methodlength"}) private void updateAndUnlock(Data previousValue, Data newValue, EntryEventType modificationType, String caller, long threadId, final Object result, long now) { EntryOffloadableSetUnlockOperation updateOperation = new EntryOffloadableSetUnlockOperation(name, modificationType, dataKey, previousValue, newValue, caller, threadId, now, entryProcessor.getBackupProcessor()); updateOperation.setPartitionId(getPartitionId()); updateOperation.setReplicaIndex(0); updateOperation.setNodeEngine(nodeEngine); updateOperation.setCallerUuid(getCallerUuid()); OperationAccessor.setCallerAddress(updateOperation, getCallerAddress()); @SuppressWarnings("checkstyle:anoninnerlength") updateOperation.setOperationResponseHandler(setUnlockResponseHandler); operationService.execute(updateOperation);
@Override public void run() throws Exception { verifyLock(); try { operator(this).init(dataKey, oldValue, newValue, null, modificationType) .doPostOperateOps(); } finally { unlockKey(); } }
@Override public WaitNotifyKey getNotifiedKey() { return new LockWaitNotifyKey(getServiceNamespace(), dataKey); }
private void unlockKey() { boolean unlocked = recordStore.unlock(dataKey, caller, threadId, getCallId()); if (!unlocked) { throw new IllegalStateException( String.format("Unexpected error! EntryOffloadableSetUnlockOperation finished but the unlock method " + "returned false for caller=%s and threadId=%d", caller, threadId)); } }
@SuppressWarnings({"unchecked", "checkstyle:methodlength"}) private void updateAndUnlock(Data previousValue, Data newValue, EntryEventType modificationType, String caller, long threadId, final Object result, long now) { EntryOffloadableSetUnlockOperation updateOperation = new EntryOffloadableSetUnlockOperation(name, modificationType, dataKey, previousValue, newValue, caller, threadId, now, entryProcessor.getBackupProcessor()); updateOperation.setPartitionId(getPartitionId()); updateOperation.setReplicaIndex(0); updateOperation.setNodeEngine(nodeEngine); updateOperation.setCallerUuid(getCallerUuid()); OperationAccessor.setCallerAddress(updateOperation, getCallerAddress()); @SuppressWarnings("checkstyle:anoninnerlength") updateOperation.setOperationResponseHandler(setUnlockResponseHandler); operationService.execute(updateOperation);
@Override public void run() throws Exception { verifyLock(); try { operator(this).init(dataKey, oldValue, newValue, null, modificationType) .doPostOperateOps(); } finally { unlockKey(); } }
@Override public WaitNotifyKey getNotifiedKey() { return new LockWaitNotifyKey(getServiceNamespace(), dataKey); }
private void unlockKey() { boolean unlocked = recordStore.unlock(dataKey, caller, threadId, getCallId()); if (!unlocked) { throw new IllegalStateException( String.format("Unexpected error! EntryOffloadableSetUnlockOperation finished but the unlock method " + "returned false for caller=%s and threadId=%d", caller, threadId)); } }
public EntryOffloadableSetUnlockOperation(String name, EntryEventType modificationType, Data key, Data oldValue, Data newValue, String caller, long threadId, long begin, EntryBackupProcessor entryBackupProcessor) { super(name, key, newValue); this.newValue = newValue; this.oldValue = oldValue; this.caller = caller; this.begin = begin; this.modificationType = modificationType; this.entryBackupProcessor = entryBackupProcessor; this.setThreadId(threadId); }
public IdentifiedDataSerializable createNew(Integer arg) { return new EntryOffloadableSetUnlockOperation(); } };