@Override public SortedSet<String> create(String[] elements) { NavigableSet<String> delegate = new TreeSet<>(MinimalCollection.of(elements)); return Collections.synchronizedNavigableSet(delegate); } })
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());
@Override public SortedSet<String> create(String[] elements) { NavigableSet<String> delegate = new TreeSet<>(MinimalCollection.of(elements)); return Collections.synchronizedNavigableSet(delegate); } })
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; }
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());
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(); }
endTime = startTime + localCycleMs; final long fileAgeCutoff = startTime - localCycleMs; filesCompleted = Collections.synchronizedNavigableSet(new TreeSet<>()); filesRemaining = Collections.synchronizedNavigableSet(new TreeSet<>()); completionTime = 0;