java.util.Collections.synchronizedNavigableSet()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(159)

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

Collections.synchronizedNavigableSet介绍

暂无

代码示例

代码示例来源:origin: google/guava

@Override
 public SortedSet<String> create(String[] elements) {
  NavigableSet<String> delegate = new TreeSet<>(MinimalCollection.of(elements));
  return Collections.synchronizedNavigableSet(delegate);
 }
})

代码示例来源:origin: wildfly/wildfly

classes.add(Collections.synchronizedMap(Collections.emptyMap()).getClass());
classes.add(Collections.synchronizedNavigableMap(Collections.emptyNavigableMap()).getClass());
classes.add(Collections.synchronizedNavigableSet(Collections.emptyNavigableSet()).getClass());
classes.add(Collections.synchronizedSet(Collections.emptySet()).getClass());
classes.add(Collections.synchronizedSortedMap(Collections.emptySortedMap()).getClass());

代码示例来源:origin: com.google.guava/guava-testlib

@Override
 public SortedSet<String> create(String[] elements) {
  NavigableSet<String> delegate = new TreeSet<>(MinimalCollection.of(elements));
  return Collections.synchronizedNavigableSet(delegate);
 }
})

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

private NavigableSet<Long> loadFileSet(final TupleInput in) {
  final int size = in.readPackedInt();
  final NavigableSet<Long> set =
    Collections.synchronizedNavigableSet(new TreeSet<>());
  long file = 0;
  for (int i = 0; i < size; i += 1) {
    file += in.readPackedLong();
    set.add(file);
  }
  return set;
}

代码示例来源:origin: org.wildfly/wildfly-clustering-marshalling-jboss

classes.add(Collections.synchronizedMap(Collections.emptyMap()).getClass());
classes.add(Collections.synchronizedNavigableMap(Collections.emptyNavigableMap()).getClass());
classes.add(Collections.synchronizedNavigableSet(Collections.emptyNavigableSet()).getClass());
classes.add(Collections.synchronizedSet(Collections.emptySet()).getClass());
classes.add(Collections.synchronizedSortedMap(Collections.emptySortedMap()).getClass());

代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-foundationdb

PrimaryIterator(FoundationDBSubscription subscription, Tuple snapshot, OrderedKeyValueTransaction transaction, String namespace, String entity, NavigableSet<String> ids, Subspace primary, AsyncIterator<KeyValue> iterator, int limit) {
  this.subscription = subscription;
  this.snapshot = snapshot;
  this.transaction = transaction;
  this.namespace = namespace;
  this.entity = entity;
  this.primary = primary;
  this.iterator = iterator;
  if (ids == null) {
    this.remainingIds = null;
  } else {
    this.remainingIds = Collections.synchronizedNavigableSet(new TreeSet<>(ids));
  }
  this.limit = limit;
  subscription.registerCancel(v -> cancel.set(true));
  subscription.registerOnBudgetPositive(n -> applyBackpressure(n));
  checkAndRecordProcessingThread();
}

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

endTime = startTime + localCycleMs;
final long fileAgeCutoff = startTime - localCycleMs;
filesCompleted = Collections.synchronizedNavigableSet(new TreeSet<>());
filesRemaining = Collections.synchronizedNavigableSet(new TreeSet<>());
completionTime = 0;

相关文章

Collections类方法