com.gemstone.gemfire.internal.cache.locks.QueuedSynchronizer.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中com.gemstone.gemfire.internal.cache.locks.QueuedSynchronizer.<init>方法的一些代码示例,展示了QueuedSynchronizer.<init>的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueuedSynchronizer.<init>方法的具体详情如下:
包路径:com.gemstone.gemfire.internal.cache.locks.QueuedSynchronizer
类名称:QueuedSynchronizer
方法名:<init>

QueuedSynchronizer.<init>介绍

[英]Creates a new QueuedSynchronizer instance.
[中]创建新的QueuedSynchronizer实例。

代码示例

代码示例来源:origin: io.snappydata/gemfire-core

public ReentrantReadWriteWriteShareLock() {
 this.sync = new QueuedSynchronizer();
}

代码示例来源:origin: io.snappydata/gemfirexd-core

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);
 }
}

代码示例来源:origin: io.snappydata/gemfire-core

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;
}

代码示例来源:origin: io.snappydata/gemfire-core

public NonReentrantReadWriteLock(InternalDistributedSystem sys,
  CancelCriterion stopper) {
 this.sync = new QueuedSynchronizer();
 if (stopper == null) {
  this.stopper = sys != null ? sys.getCancelCriterion() : null;
 }
 else {
  this.stopper = stopper;
 }
}

代码示例来源:origin: io.snappydata/snappydata-store-core

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);
 }
}

代码示例来源:origin: io.snappydata/gemfirexd

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);
 }
}

代码示例来源:origin: io.snappydata/gemfire-core

/**
 * @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;
}

相关文章