Class UnionRedirection

java.lang.Object
com.illumon.iris.db.v2.sources.UnionRedirection
All Implemented Interfaces:
Serializable

public class UnionRedirection extends Object implements 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 Details

    • CHUNK_MULTIPLE

      public static final long CHUNK_MULTIPLE
      This 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 space
      maxKey - the max key for the table with tableId
      Returns:
      the relative shift to be applied to all tables with greater tableIds