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

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

本文整理了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

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

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

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

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

  1. protected boolean isMultithreaded() {
  2. return X_Runtime.isMultithreaded();
  3. }

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

  1. protected <K, V> Map<K,V> newMap(final CollectionOptions opts) {
  2. if (opts.insertionOrdered()) {
  3. if (opts.concurrent()) {
  4. // TODO: something with better performance...
  5. // Perhaps supersource ConcurrentSkipListMap,
  6. // and remove all the contention-worries that plague its implementation
  7. return synchronizedMap(new LinkedHashMap<K, V>());
  8. } else {
  9. return new LinkedHashMap<K, V>();
  10. }
  11. }
  12. if (X_Runtime.isMultithreaded()) {
  13. return new ConcurrentHashMap<K,V>();
  14. } else {
  15. return new HashMap<K,V>();
  16. }
  17. }

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

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

相关文章