K - key type of underlying streamV - value type of transformed streamS - type of the transformed streampublic abstract class AbstractForEachOperation<K,V,S extends BaseStream<V,S>> extends BaseTerminalOperation implements KeyTrackingTerminalOperation<K,V,K>
Map.Entry instances where the key is typed the same
as defined K type.KeyTrackingTerminalOperation.IntermediateCollector<C>intermediateOperations, supplier| Constructor and Description |
|---|
AbstractForEachOperation(Iterable<IntermediateOperation> intermediateOperations,
Supplier<Stream<CacheEntry>> supplier,
int batchSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize() |
protected abstract void |
handleList(List<V> list) |
protected abstract void |
handleStreamForEach(S stream,
List<V> list) |
boolean |
lostSegment(boolean stopIfLost)
This method will be invoked when the operation is known to be performing on a given set of segments
and this node no longer owns 1 or many of them.
|
List<V> |
performOperation(KeyTrackingTerminalOperation.IntermediateCollector<Collection<V>> response)
Invoked when a key aware operation is desired without rehash being enabled.
|
Collection<CacheEntry<K,K>> |
performOperationRehashAware(KeyTrackingTerminalOperation.IntermediateCollector<Collection<CacheEntry<K,K>>> response)
Invoked when a key and rehash aware operation is desired.
|
getIntermediateOperations, handleInjection, setSupplierclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleInjection, setSupplierpublic AbstractForEachOperation(Iterable<IntermediateOperation> intermediateOperations, Supplier<Stream<CacheEntry>> supplier, int batchSize)
public boolean lostSegment(boolean stopIfLost)
SegmentAwareOperationlostSegment in interface SegmentAwareOperationstopIfLost - argument to tell the operation that if this segment affects that it should not
perform any more operations if possible as all segments have been lost.public List<V> performOperation(KeyTrackingTerminalOperation.IntermediateCollector<Collection<V>> response)
KeyTrackingTerminalOperationperformOperation in interface KeyTrackingTerminalOperation<K,V,K>response - the collector that will be called back for any intermediate resultspublic Collection<CacheEntry<K,K>> performOperationRehashAware(KeyTrackingTerminalOperation.IntermediateCollector<Collection<CacheEntry<K,K>>> response)
KeyTrackingTerminalOperationperformOperationRehashAware in interface KeyTrackingTerminalOperation<K,V,K>response - the collector that will be called back for any intermediate resultspublic int getBatchSize()
Copyright © 2025 JBoss, a division of Red Hat. All rights reserved.