log.info("[{}] Going to automatically offload ledgers {}" + ", total size = {}, already offloaded = {}, to offload = {}", name, toOffload.stream().map(l -> l.getLedgerId()).collect(Collectors.toList()), sizeSummed, alreadyOffloadedSize, toOffloadSize); } else {
@Override public Stream<WeakReference<T>> stream() { dirty = true; return super.stream(); } }
@Override @Nonnull public String toString() { return this.lines.stream() .collect(Collectors.joining(System.lineSeparator())); }
/** * Clear. * * @return the long */ public long clear() { return buckets.keySet().stream().mapToLong(length -> buckets.remove(length).stream().mapToLong(ref -> { return freeItem(ref.obj.get(), length); }).sum()).sum(); }
@Override public void onError(Throwable t) { if (finished.compareAndSet(false, true)) { upstreamPublisherSubscriptions.stream() .filter(upstreamPublisherSubscription -> upstreamPublisherSubscription != subscription) .forEach(Subscription::cancel); upstreamPublisherSubscriptions.clear(); upstreamPublishers.clear(); downstreamSubscriber.onError(t); } }
protected List<TestChangeSet> getObservedChangeSet() { return receivedChangeSet.stream().collect(Collectors.toList()); }
log.info("[{}] Going to automatically offload ledgers {}" + ", total size = {}, already offloaded = {}, to offload = {}", name, toOffload.stream().map(l -> l.getLedgerId()).collect(Collectors.toList()), sizeSummed, alreadyOffloadedSize, toOffloadSize); } else {
/** * Recycle. * * @param data the data * @param size the size */ public void recycle(@Nullable final T data, long size) { if (null != data && size >= getMinLengthPerBuffer() && size <= getMaxLengthPerBuffer()) { @Nullable StackCounter stackCounter = getRecycle_put(size); if (null != stackCounter) { stackCounter.increment(size); } ConcurrentLinkedDeque<ObjectWrapper> bin = getBin(size); if (bin.size() < Math.min(Math.max(1, (int) (getMaxLengthPerBuffer() / size)), getMaxItemsPerBuffer())) { synchronized (bin) { if (!bin.stream().filter(x -> equals(x.obj.get(), data)).findAny().isPresent()) { bin.add(new ObjectWrapper(wrap(data))); return; } } } } freeItem(data, size); }