Class TupleKeyedAbstractImportState<KEY_TYPE>
- All Implemented Interfaces:
ImportState
- Direct Known Subclasses:
ImportStatePartitionIndex
,LastByTableImportState
-
Field Summary
Fields inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.ImportState
serialVersionUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Observe a new row for the specified uni-element key.final void
Observe a new row for the specified multi-element key.final void
Observe a new row for the specified bi-element key.final void
Observe a new row for the specified tri-element key.abstract void
newRowForKey
(KEY_TYPE key) subclasses must implement this callback, we forward all keys through it.final Object
prepareElement
(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 tonewRow(Object)
.final KEY_TYPE
prepareKey
(KEY_TYPE key) Prepare a key for inclusion in the import state.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.tables.dataimport.logtailer.ImportState
ensureInitialized, getImportDetails, onClose, onFlush, onRelease, onResume, onTruncate
-
Constructor Details
-
TupleKeyedAbstractImportState
public TupleKeyedAbstractImportState()
-
-
Method Details
-
newRowForKey
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
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
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 keykeyElement2
- The second element that makes up the bi-element key
-
newRow
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 keykeyElement2
- The second element that makes up the tri-element keykeyElement3
- The second element that makes up the tri-element key
-
newRow
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
Prepare a key element (that is, a component of a compound key) before using it to build a key that will be passed tonewRow(Object)
. This entails canonicalization, and convertingStringCompatible
instances toString
s.- Parameters:
element
- The element to prepare- Returns:
- The preparation result
-
prepareKey
Prepare a key for inclusion in the import state.- Parameters:
key
- The key- Returns:
- The prepared result
-