Package org.infinispan.stream.impl
Interface ClusterStreamManager.ResultsCallback<R>
-
- Type Parameters:
R
- the type of results returned
- Enclosing interface:
- ClusterStreamManager<Original,K>
public static interface ClusterStreamManager.ResultsCallback<R>
A callback that is used for result processing from the remote nodes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onCompletion(Address address, org.infinispan.commons.util.IntSet completedSegments, R results)
Essentially the same asonIntermediateResult(Address address, Object)
except that this is the last time this callback will be invoked and it tells which segments were completedvoid
onIntermediateResult(Address address, R results)
Called back for intermediate data returned from an operation.void
onSegmentsLost(org.infinispan.commons.util.IntSet segments)
Called back when a segment is found to have been lost that is no longer remote This method should return as soon as possible and not block in any fashion.
-
-
-
Method Detail
-
onIntermediateResult
void onIntermediateResult(Address address, R results)
Called back for intermediate data returned from an operation. This is useful for operations that utilized batch fetching such asCacheStream.iterator()
,CacheStream.spliterator()
,CacheStream.forEach(Consumer)
andStream.toArray()
.- Parameters:
address
- Which node this data came fromresults
- The results obtained so far.
-
onCompletion
void onCompletion(Address address, org.infinispan.commons.util.IntSet completedSegments, R results)
Essentially the same asonIntermediateResult(Address address, Object)
except that this is the last time this callback will be invoked and it tells which segments were completed- Parameters:
address
- Which node this data came fromresults
- The last batch of results for this operator
-
onSegmentsLost
void onSegmentsLost(org.infinispan.commons.util.IntSet segments)
Called back when a segment is found to have been lost that is no longer remote This method should return as soon as possible and not block in any fashion. This method may be invoked concurrently with any of the other methods- Parameters:
segments
- The segments that were requested but are now local
-
-