xapi.util.X_Runtime.isMultithreaded()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(128)

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

X_Runtime.isMultithreaded介绍

暂无

代码示例

代码示例来源:origin: net.wetheinter/xapi-core-process

public boolean isMultiThreaded() {
 return X_Runtime.isMultithreaded();
}

代码示例来源:origin: net.wetheinter/xapi-core-collect

public Builder() {
 concurrent = X_Runtime.isMultithreaded();
}

代码示例来源:origin: net.wetheinter/xapi-core-collect

protected boolean isMultithreaded() {
 return X_Runtime.isMultithreaded();
}

代码示例来源:origin: net.wetheinter/xapi-core-collect

protected <K, V> Map<K,V> newMap(final CollectionOptions opts) {
 if (opts.insertionOrdered()) {
  if (opts.concurrent()) {
   // TODO: something with better performance...
   // Perhaps supersource ConcurrentSkipListMap,
   // and remove all the contention-worries that plague its implementation
   return synchronizedMap(new LinkedHashMap<K, V>());
  } else {
   return new LinkedHashMap<K, V>();
  }
 }
 if (X_Runtime.isMultithreaded()) {
  return new ConcurrentHashMap<K,V>();
 } else {
  return new HashMap<K,V>();
 }
}

代码示例来源:origin: net.wetheinter/xapi-jre-inject

X_Log.info("Multithreaded? ", X_Runtime.isMultithreaded());
X_Log.info("Prepped: ", X_Time.difference(start, prepped));
X_Log.info("Scanned: ", X_Time.difference(prepped, scanned));

相关文章