Package com.illumon.iris.db.v2.dataindex
Class MemoizingGroupingProvider
java.lang.Object
com.illumon.iris.db.v2.dataindex.MemoizingGroupingProvider
- All Implemented Interfaces:
GroupingProvider
- Direct Known Subclasses:
DiskBackedDeferredGroupingProvider
,PartitionColumnGroupingProvider
,StaticGroupingProvider
public abstract class MemoizingGroupingProvider extends Object implements GroupingProvider
A base
GroupingProvider
that supports memoization.-
Constructor Summary
Constructors Constructor Description MemoizingGroupingProvider()
-
Method Summary
Modifier and Type Method Description void
clearMemoizedGroupings()
Clear all memoized groupings.protected Table
memoizeGrouping(GroupingMemoKey memoKey, Supplier<Table> groupingFactory)
Get the memoized grouping, or compute it if none existed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.locations.GroupingProvider
getGroupingBuilder, hasGrouping
-
Constructor Details
-
MemoizingGroupingProvider
public MemoizingGroupingProvider()
-
-
Method Details
-
memoizeGrouping
@Nullable protected Table memoizeGrouping(@Nullable GroupingMemoKey memoKey, @NotNull Supplier<Table> groupingFactory)Get the memoized grouping, or compute it if none existed.- Parameters:
memoKey
- the memo key, or null if memoization is not allowed.groupingFactory
- the method to create the grouping- Returns:
- the resultant grouping.
-
clearMemoizedGroupings
public void clearMemoizedGroupings()Clear all memoized groupings.
-