Package org.infinispan.stream.impl
Class IteratorResponses
- java.lang.Object
-
- org.infinispan.stream.impl.IteratorResponses
-
- All Implemented Interfaces:
IteratorResponse
public abstract class IteratorResponses extends Object implements IteratorResponse
Response object used when an iterator is the response value and it is unknown if the iterator has enough entries for the given batch size. TheIteratorResponses.RemoteResponse
is used by a remote node to return and this will be externalized into aIteratorResponses.BatchResponse
orIteratorResponses.LastResponse
on the requesting node depending on if the iterator has seen all entries.- Since:
- 9.0
- Author:
- wburns
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IteratorResponses.IteratorResponsesExternalizer
This externalizer is a special breed that converts a given response into others, based on whether or not an iterator has completed or not.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Object>
getIterator()
Spliterator<Object>
getSpliterator()
The spliterator containing the elements from the response.boolean
isComplete()
Whether the iterator is the end or if more requests are needed-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.stream.impl.IteratorResponse
getSuspectedSegments
-
-
-
-
Method Detail
-
getSpliterator
public Spliterator<Object> getSpliterator()
Description copied from interface:IteratorResponse
The spliterator containing the elements from the response. This spliterator is guaranteed to have a known exact size when invokingSpliterator.getExactSizeIfKnown()
.- Specified by:
getSpliterator
in interfaceIteratorResponse
- Returns:
- the spliterator
-
isComplete
public boolean isComplete()
Description copied from interface:IteratorResponse
Whether the iterator is the end or if more requests are needed- Specified by:
isComplete
in interfaceIteratorResponse
- Returns:
- if no more elements are available
-
-