Package com.illumon.iris.db.v2.sources
Class UnionRedirection
java.lang.Object
com.illumon.iris.db.v2.sources.UnionRedirection
- All Implemented Interfaces:
Serializable
This class manages the constituent Tables for a UnionColumnSource, so that we can map from an outer (merged) index
into the appropriate segment of a component table.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
This is the minimum size of an initial allocation of a region. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTable
(long maxKey) Append a new table at the end of this union with the given maxKey.long
computeShiftIfNeeded
(int tableId, long maxKey) Computes any shift that should be applied to future tables.
-
Field Details
-
CHUNK_MULTIPLE
public static final long CHUNK_MULTIPLEThis is the minimum size of an initial allocation of a region.
-
-
Constructor Details
-
UnionRedirection
public UnionRedirection()
-
-
Method Details
-
appendTable
public void appendTable(long maxKey) Append a new table at the end of this union with the given maxKey. It is expected that tables will be added in tableId order.- Parameters:
maxKey
- the maximum key of the table
-
computeShiftIfNeeded
public long computeShiftIfNeeded(int tableId, long maxKey) Computes any shift that should be applied to future tables.- Parameters:
tableId
- the table id of the table that might need more spacemaxKey
- the max key for the table with tableId- Returns:
- the relative shift to be applied to all tables with greater tableIds
-