Interface Reducer
-
- All Known Implementing Classes:
AbstractReducer,SortedReducer,UnsortedBaseReducer,UnsortedOneWayReducer,UnsortedReducer
public interface ReducerReducer for remote index lookup results.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceReducer.RowComparatorRows comparator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPage(ReduceResultPage page)Offer result page for reduce.booleanfetchedAll()Check if all rows has been fetched from all sources.org.h2.index.Cursorfind(@Nullable org.h2.result.SearchRow first, @Nullable org.h2.result.SearchRow last)Find a rows and create a cursor to iterate over the result.booleanhasSource(UUID nodeId)Check if node with given nodeId is data source node for the index.voidonFailure(UUID nodeId, javax.cache.CacheException e)Fail cursor callback.voidsetPageSize(int pageSize)voidsetSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)Set source nodes.Set<UUID>sources()
-
-
-
Method Detail
-
hasSource
boolean hasSource(UUID nodeId)
Check if node with given nodeId is data source node for the index.- Parameters:
nodeId- Node ID.- Returns:
trueIf this index needs data from the given source node,falseotherwise.
-
setSources
void setSources(Map<ClusterNode,BitSet> nodesToSegmentsCnt)
Set source nodes.- Parameters:
nodesToSegmentsCnt- Mapping of nodes to expected count of segments to scan.
-
addPage
void addPage(ReduceResultPage page)
Offer result page for reduce.- Parameters:
page- Page.
-
setPageSize
void setPageSize(int pageSize)
- Parameters:
pageSize- Page size.
-
fetchedAll
boolean fetchedAll()
Check if all rows has been fetched from all sources.- Returns:
trueIf all rows has been fetched,falseotherwise.
-
find
org.h2.index.Cursor find(@Nullable @Nullable org.h2.result.SearchRow first, @Nullable @Nullable org.h2.result.SearchRow last)Find a rows and create a cursor to iterate over the result.- Parameters:
first- Lower bound.last- Upper bound.- Returns:
- Cursor instance.
-
onFailure
void onFailure(UUID nodeId, javax.cache.CacheException e)
Fail cursor callback.- Parameters:
nodeId- Node ID.e- Exception.
-
-