Class AbstractCacheStream<Original,T,S extends BaseStream<T,S>,S2 extends S>

java.lang.Object
org.infinispan.stream.impl.AbstractCacheStream<Original,T,S,S2>
Type Parameters:
Original - the original type of the underlying stream - normally CacheEntry or Object
T - The type returned by the stream
S - The stream interface
All Implemented Interfaces:
AutoCloseable, BaseStream<T,S>
Direct Known Subclasses:
DistributedCacheStream, DistributedDoubleCacheStream, DistributedIntCacheStream, DistributedLongCacheStream

public abstract class AbstractCacheStream<Original,T,S extends BaseStream<T,S>,S2 extends S> extends Object implements BaseStream<T,S>
Abstract stream that provides all of the common functionality required for all types of Streams including the various primitive types.
  • Field Details

    • intermediateOperations

      protected final Queue<org.infinispan.stream.impl.intops.IntermediateOperation> intermediateOperations
    • localAddress

      protected final Address localAddress
    • cpm

      protected final ClusterPublisherManager cpm
    • executor

      protected final Executor executor
    • registry

      protected final ComponentRegistry registry
    • partition

      protected final PartitionHandlingManager partition
    • keyPartitioner

      protected final KeyPartitioner keyPartitioner
    • stateTransferLock

      protected final org.infinispan.statetransfer.StateTransferLock stateTransferLock
    • explicitFlags

      protected final long explicitFlags
    • toKeyFunction

      protected final Function<? super Original,?> toKeyFunction
    • invocationContext

      protected final InvocationContext invocationContext
    • closeRunnable

      protected Runnable closeRunnable
    • parallelDistribution

      protected Boolean parallelDistribution
    • parallel

      protected boolean parallel
    • rehashAware

      protected boolean rehashAware
    • keysToFilter

      protected Set<?> keysToFilter
    • segmentsToFilter

      protected IntSet segmentsToFilter
    • distributedBatchSize

      protected int distributedBatchSize
    • segmentCompletionListener

      protected Consumer<Supplier<PrimitiveIterator.OfInt>> segmentCompletionListener
    • iteratorOperation

      protected org.infinispan.stream.impl.AbstractCacheStream.IteratorOperation iteratorOperation
    • timeout

      protected long timeout
    • timeoutUnit

      protected TimeUnit timeoutUnit
  • Constructor Details

  • Method Details

    • getLog

      protected abstract org.infinispan.util.logging.Log getLog()
    • addIntermediateOperation

      protected S2 addIntermediateOperation(org.infinispan.stream.impl.intops.IntermediateOperation<T,S,T,S> intermediateOperation)
    • addIntermediateOperationMap

      protected void addIntermediateOperationMap(org.infinispan.stream.impl.intops.IntermediateOperation<T,S,?,?> intermediateOperation)
    • addIntermediateOperation

      protected void addIntermediateOperation(Queue<org.infinispan.stream.impl.intops.IntermediateOperation> intermediateOperations, org.infinispan.stream.impl.intops.IntermediateOperation<T,S,?,?> intermediateOperation)
    • unwrap

      protected abstract S2 unwrap()
    • isParallel

      public boolean isParallel()
      Specified by:
      isParallel in interface BaseStream<Original,T>
    • sequential

      public S2 sequential()
      Specified by:
      sequential in interface BaseStream<Original,T>
    • parallel

      public S2 parallel()
      Specified by:
      parallel in interface BaseStream<Original,T>
    • unordered

      public S2 unordered()
      Specified by:
      unordered in interface BaseStream<Original,T>
    • onClose

      public S2 onClose(Runnable closeHandler)
      Specified by:
      onClose in interface BaseStream<Original,T>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface BaseStream<Original,T>
    • isPrimaryOwner

      protected boolean isPrimaryOwner(ConsistentHash ch, Object key)
    • composeWithExceptions

      Given two SegmentCompletionListener, return a SegmentCompletionListener that executes both in sequence, even if the first throws an exception, and if both throw exceptions, add any exceptions thrown by the second as suppressed exceptions of the first.