@Override public boolean shouldWait() { // optimisation for ReadOnly processors -> they will not wait for the lock if (entryProcessor instanceof ReadOnly) { offload = isOffloadingRequested(entryProcessor); return false; } // mutating offload -> only if key not locked, since it uses locking too (but on reentrant one) if (!recordStore.isLocked(dataKey) && isOffloadingRequested(entryProcessor)) { offload = true; return false; } //at this point we cannot offload. the entry is locked or the EP does not support offload //if the entry is locked by us then we can still run the EP on the partition thread offload = false; return !recordStore.canAcquireLock(dataKey, getCallerUuid(), getThreadId()); }
@Override public boolean shouldWait() { // optimisation for ReadOnly processors -> they will not wait for the lock if (entryProcessor instanceof ReadOnly) { offload = isOffloadingRequested(entryProcessor); return false; } // mutating offload -> only if key not locked, since it uses locking too (but on reentrant one) if (!recordStore.isLocked(dataKey) && isOffloadingRequested(entryProcessor)) { offload = true; return false; } //at this point we cannot offload. the entry is locked or the EP does not support offload //if the entry is locked by us then we can still run the EP on the partition thread offload = false; return !recordStore.canAcquireLock(dataKey, getCallerUuid(), getThreadId()); }
updateOperation.setReplicaIndex(0); updateOperation.setNodeEngine(nodeEngine); updateOperation.setCallerUuid(getCallerUuid()); OperationAccessor.setCallerAddress(updateOperation, getCallerAddress()); @SuppressWarnings("checkstyle:anoninnerlength")
updateOperation.setReplicaIndex(0); updateOperation.setNodeEngine(nodeEngine); updateOperation.setCallerUuid(getCallerUuid()); OperationAccessor.setCallerAddress(updateOperation, getCallerAddress()); @SuppressWarnings("checkstyle:anoninnerlength")