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 interface
AbstractLocalCacheStream.StreamSupplier<T,S extends BaseStream<T,S>>
-
Field Summary
Fields Modifier and Type Field Description protected Queue<IntermediateOperation>
intermediateOperations
protected Set<?>
keysToFilter
protected Collection<Runnable>
onCloseRunnables
protected boolean
parallel
protected ComponentRegistry
registry
protected org.infinispan.commons.util.IntSet
segmentsToFilter
protected 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 void
close()
protected S
createStream()
boolean
isParallel()
S2
onClose(Runnable closeHandler)
S2
parallel()
S2
sequential()
S2
unordered()
-
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:
isParallel
in interfaceBaseStream<T,S extends BaseStream<T,S>>
-
sequential
public S2 sequential()
- Specified by:
sequential
in interfaceBaseStream<T,S extends BaseStream<T,S>>
-
parallel
public S2 parallel()
- Specified by:
parallel
in interfaceBaseStream<T,S extends BaseStream<T,S>>
-
unordered
public S2 unordered()
- Specified by:
unordered
in interfaceBaseStream<T,S extends BaseStream<T,S>>
-
onClose
public S2 onClose(Runnable closeHandler)
- Specified by:
onClose
in interfaceBaseStream<T,S extends BaseStream<T,S>>
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBaseStream<T,S extends BaseStream<T,S>>
-
-