public ReentrantReadWriteWriteShareLock() { this.sync = new QueuedSynchronizer(); }
private GfxdReentrantReadWriteLock(Object name, boolean allowLockDowngrade, int timeoutSecs) { this.lockName = name; this.sync = new QueuedSynchronizer(); this.waitThreshold = timeoutSecs; if (GemFireXDUtils.TraceLock) { this.traceLock = 1; } if (allowLockDowngrade) { this.flags = GemFireXDUtils.set(this.flags, ALLOW_LOCK_DOWNGRADE); } }
public NonReentrantLock(boolean useWaitThreshold, InternalDistributedSystem sys, CancelCriterion stopper) { this.sync = new QueuedSynchronizer(); if (stopper == null) { this.stopper = sys != null ? sys.getCancelCriterion() : null; } else { this.stopper = stopper; } this.useWaitThreshold = useWaitThreshold; }
public NonReentrantReadWriteLock(InternalDistributedSystem sys, CancelCriterion stopper) { this.sync = new QueuedSynchronizer(); if (stopper == null) { this.stopper = sys != null ? sys.getCancelCriterion() : null; } else { this.stopper = stopper; } }
private GfxdReentrantReadWriteLock(Object name, boolean allowLockDowngrade, int timeoutSecs) { this.lockName = name; this.sync = new QueuedSynchronizer(); this.waitThreshold = timeoutSecs; if (GemFireXDUtils.TraceLock) { this.traceLock = 1; } if (allowLockDowngrade) { this.flags = GemFireXDUtils.set(this.flags, ALLOW_LOCK_DOWNGRADE); } }
private GfxdReentrantReadWriteLock(Object name, boolean allowLockDowngrade, int timeoutSecs) { this.lockName = name; this.sync = new QueuedSynchronizer(); this.waitThreshold = timeoutSecs; if (GemFireXDUtils.TraceLock) { this.traceLock = 1; } if (allowLockDowngrade) { this.flags = GemFireXDUtils.set(this.flags, ALLOW_LOCK_DOWNGRADE); } }
/** * @see MapCallback#newValue */ @Override public final QueuedSynchronizer newValue(final RegionEntry key, final AbstractRegionEntry entry, final Void ignored, final MapResult result) { final QueuedSynchronizer sync = new QueuedSynchronizer(); // set one waiter on the queue sync.initNumWaiters(1); // set the waiters flag on the entry entry.setHasWaiters(); return sync; }