Package org.infinispan.stream.impl.local
Class AbstractLocalCacheStream<T,S extends BaseStream<T,S>,S2 extends S>
- java.lang.Object
-
- org.infinispan.stream.impl.local.AbstractLocalCacheStream<T,S,S2>
-
- All Implemented Interfaces:
AutoCloseable,BaseStream<T,S>
- Direct Known Subclasses:
LocalCacheStream,LocalDoubleCacheStream,LocalIntCacheStream,LocalLongCacheStream
public abstract class AbstractLocalCacheStream<T,S extends BaseStream<T,S>,S2 extends S> extends Object implements BaseStream<T,S>
Implements the base operations required for a local stream. stream is populated
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractLocalCacheStream.StreamSupplier<T,S extends BaseStream<T,S>>
-
Field Summary
Fields Modifier and Type Field Description protected Queue<IntermediateOperation>intermediateOperationsprotected Set<?>keysToFilterprotected Collection<Runnable>onCloseRunnablesprotected booleanparallelprotected ComponentRegistryregistryprotected org.infinispan.commons.util.IntSetsegmentsToFilterprotected AbstractLocalCacheStream.StreamSupplier<T,S>streamSupplier
-
Constructor Summary
Constructors Constructor Description AbstractLocalCacheStream(AbstractLocalCacheStream.StreamSupplier<T,S> streamSupplier, boolean parallel, ComponentRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected ScreateStream()booleanisParallel()S2onClose(Runnable closeHandler)S2parallel()S2sequential()S2unordered()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.stream.BaseStream
iterator, spliterator
-
-
-
-
Field Detail
-
streamSupplier
protected final AbstractLocalCacheStream.StreamSupplier<T,S extends BaseStream<T,S>> streamSupplier
-
registry
protected final ComponentRegistry registry
-
onCloseRunnables
protected final Collection<Runnable> onCloseRunnables
-
intermediateOperations
protected final Queue<IntermediateOperation> intermediateOperations
-
segmentsToFilter
protected org.infinispan.commons.util.IntSet segmentsToFilter
-
keysToFilter
protected Set<?> keysToFilter
-
parallel
protected boolean parallel
-
-
Constructor Detail
-
AbstractLocalCacheStream
public AbstractLocalCacheStream(AbstractLocalCacheStream.StreamSupplier<T,S> streamSupplier, boolean parallel, ComponentRegistry registry)
- Parameters:
streamSupplier-parallel-registry-
-
-
Method Detail
-
createStream
protected final S createStream()
-
isParallel
public boolean isParallel()
- Specified by:
isParallelin interfaceBaseStream<T,S extends BaseStream<T,S>>
-
sequential
public S2 sequential()
- Specified by:
sequentialin interfaceBaseStream<T,S extends BaseStream<T,S>>
-
parallel
public S2 parallel()
- Specified by:
parallelin interfaceBaseStream<T,S extends BaseStream<T,S>>
-
unordered
public S2 unordered()
- Specified by:
unorderedin interfaceBaseStream<T,S extends BaseStream<T,S>>
-
onClose
public S2 onClose(Runnable closeHandler)
- Specified by:
onClosein interfaceBaseStream<T,S extends BaseStream<T,S>>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<T,S extends BaseStream<T,S>>
-
-