org.apache.jena.atlas.lib.Lib.readThreadLocal()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(204)

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

Lib.readThreadLocal介绍

[英]Read thread local, assuming that "null" means it does not exist for this thread. If null is read, the thread local is removed.
[中]读取线程本地,假设“null”表示该线程不存在。如果读取null,则删除本地线程。

代码示例

代码示例来源:origin: apache/jena

@Override
public boolean isInTransaction() {
  return Lib.readThreadLocal(transactionMode) != null;
}

代码示例来源:origin: apache/jena

@Override
public ReadWrite transactionMode() {
  return Lib.readThreadLocal(transactionMode);
}

代码示例来源:origin: apache/jena

@Override
public TxnType transactionType() {
  return Lib.readThreadLocal(transactionType);
}

代码示例来源:origin: apache/jena

@Override
final
public Transaction getThreadTransaction() {
  return  Lib.readThreadLocal(theTxn);
}

代码示例来源:origin: apache/jena

@Override public ReadWrite transactionMode() {
  return Lib.readThreadLocal(txnMode) ;
}

代码示例来源:origin: apache/jena

@Override public TxnType transactionType() {
  return Lib.readThreadLocal(txnType) ;
}

代码示例来源:origin: org.apache.jena/jena-dboe-transaction

@Override
final
public Transaction getThreadTransaction() {
  return  Lib.readThreadLocal(theTxn);
}

代码示例来源:origin: apache/jena

@Override
public boolean isInTransaction() {
  return Lib.readThreadLocal(theTxn) != null;
}

代码示例来源:origin: org.apache.jena/jena-dboe-transaction

@Override
public boolean isInTransaction() {
  return Lib.readThreadLocal(theTxn) != null;
}

代码示例来源:origin: apache/jena

public boolean isTransactionMode(ReadWrite mode) {
  if ( ! isInTransaction() )
    return false;
  return Lib.readThreadLocal(txnMode) == mode;
}

代码示例来源:origin: apache/jena

@Override
public TxnType transactionType() {
  checkRunning() ;
  Transaction txn = Lib.readThreadLocal(theTxn) ;
  if ( txn != null )
    return txn.getTxnType() ;
  return null ;
}

代码示例来源:origin: org.apache.jena/jena-dboe-transaction

@Override
public TxnType transactionType() {
  checkRunning() ;
  Transaction txn = Lib.readThreadLocal(theTxn) ;
  if ( txn != null )
    return txn.getTxnType() ;
  return null ;
}

代码示例来源:origin: org.apache.jena/jena-dboe-transaction

@Override
public ReadWrite transactionMode() {
  checkRunning() ;
  Transaction txn = Lib.readThreadLocal(theTxn) ;
  if ( txn != null )
    return txn.getMode() ;
  return null ; 
}

代码示例来源:origin: apache/jena

@Override
public ReadWrite transactionMode() {
  checkRunning() ;
  Transaction txn = Lib.readThreadLocal(theTxn) ;
  if ( txn != null )
    return txn.getMode() ;
  return null ; 
}

相关文章