com.sleepycat.je.Transaction.setLockTimeout()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(102)

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

Transaction.setLockTimeout介绍

[英]Configures the lock request timeout value for the transaction, with the timeout value specified in microseconds. This method is equivalent to:

setLockTimeout(long, TimeUnit.MICROSECONDS);

[中]

代码示例

代码示例来源:origin: com.amazon.carbonado/carbonado-sleepycat-je

void setLockTimeout(long timeout) throws DatabaseException {
  if (timeout <= 0) {
    timeout = timeout < 0 ? 0 : 1;
  }
  mTxn.setLockTimeout(timeout);
}

代码示例来源:origin: com.sleepycat/je

/**
 * Configures the lock request timeout value for the transaction, with the
 * timeout value specified in microseconds.  This method is equivalent to:
 *
 * <pre>setLockTimeout(long, TimeUnit.MICROSECONDS);</pre>
 *
 * @deprecated as of 4.0, replaced by {@link #setLockTimeout(long,
 * TimeUnit)}.
 */
public void setLockTimeout(long timeOut)
  throws IllegalArgumentException, DatabaseException {
  setLockTimeout(timeOut, TimeUnit.MICROSECONDS);
}

代码示例来源:origin: io.permazen/permazen-kv-bdb

@Override
public void setTimeout(long timeout) {
  Preconditions.checkArgument(timeout >= 0, "timeout < 0");
  this.tx.setLockTimeout(timeout, TimeUnit.MILLISECONDS);
}

代码示例来源:origin: org.jsimpledb/jsimpledb-kv-bdb

@Override
public void setTimeout(long timeout) {
  Preconditions.checkArgument(timeout >= 0, "timeout < 0");
  this.tx.setLockTimeout(timeout, TimeUnit.MILLISECONDS);
}

相关文章