Class TupleKeyedAbstractImportState<KEY_TYPE>

java.lang.Object
com.illumon.iris.db.tables.dataimport.importstate.TupleKeyedAbstractImportState<KEY_TYPE>
All Implemented Interfaces:
ImportState
Direct Known Subclasses:
ImportStatePartitionIndex, LastByTableImportState

public abstract class TupleKeyedAbstractImportState<KEY_TYPE> extends Object implements ImportState
  • Constructor Details

    • TupleKeyedAbstractImportState

      public TupleKeyedAbstractImportState()
  • Method Details

    • newRowForKey

      public abstract void newRowForKey(KEY_TYPE key)
      subclasses must implement this callback, we forward all keys through it.
      Parameters:
      key - immutable key object containing the parameters passed to newRow from listener/importer.
    • newRow

      public final void newRow(Object keyElement)

      Observe a new row for the specified uni-element key.

      Note that key elements must be either functionally immutable or instances of StringCompatible.

      It is recommended that users of compound keys use newRowForKey(Object) coupled with appropriate key and/or key element preparation.

      Parameters:
      keyElement - The key element
    • newRow

      public final void newRow(Object keyElement1, Object keyElement2)

      Observe a new row for the specified bi-element key.

      Note that key elements must be either functionally immutable or instances of StringCompatible.

      It is recommended that users of compound keys use newRowForKey(Object) coupled with appropriate key and/or key element preparation.

      Parameters:
      keyElement1 - The first element that makes up the bi-element key
      keyElement2 - The second element that makes up the bi-element key
    • newRow

      public final void newRow(Object keyElement1, Object keyElement2, Object keyElement3)

      Observe a new row for the specified tri-element key.

      Note that key elements must be either functionally immutable or instances of StringCompatible.

      It is recommended that users of compound keys use newRowForKey(Object) coupled with appropriate key and/or key element preparation.

      Parameters:
      keyElement1 - The first element that makes up the tri-element key
      keyElement2 - The second element that makes up the tri-element key
      keyElement3 - The second element that makes up the tri-element key
    • newRow

      public final void newRow(Object... keyElements)

      Observe a new row for the specified multi-element key.

      Note that key elements must be either functionally immutable or instances of StringCompatible.

      It is recommended that users of compound keys use newRowForKey(Object) coupled with appropriate key and/or key element preparation.

      Parameters:
      keyElements - The elements that makes up the multi-element key
    • prepareElement

      public final Object prepareElement(@Nullable Object element)
      Prepare a key element (that is, a component of a compound key) before using it to build a key that will be passed to newRow(Object). This entails canonicalization, and converting StringCompatible instances to Strings.
      Parameters:
      element - The element to prepare
      Returns:
      The preparation result
    • prepareKey

      public final KEY_TYPE prepareKey(@Nullable KEY_TYPE key)
      Prepare a key for inclusion in the import state.
      Parameters:
      key - The key
      Returns:
      The prepared result