Package com.illumon.iris.db.v2
Class ShiftAwareListener.Update
java.lang.Object
com.illumon.iris.db.v2.ShiftAwareListener.Update
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
- Enclosing interface:
- ShiftAwareListener
public static class ShiftAwareListener.Update
extends Object
implements com.fishlib.base.log.LogOutputAppendable
A shift aware update structure, containing the rows and columns that were added, modified, removed, and shifted
on a given cycle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionrows added (post-shift keyspace)rows modified (post-shift keyspace)the set of columns that might have changed for rows in themodified()
indexrows removed (pre-shift keyspace)rows that shifted to new indices -
Constructor Summary
ConstructorsConstructorDescriptionUpdate()
Update
(Index added, Index removed, Index modified, IndexShiftData shifted, ModifiedColumnSet modifiedColumnSet) -
Method Summary
Modifier and TypeMethodDescriptionacquire()
Increment the reference count on this object.com.fishlib.base.log.LogOutput
append
(com.fishlib.base.log.LogOutput logOutput) copy()
Make a deep copy of this object.boolean
empty()
void
forAllModified
(BiConsumer<Long, Long> consumer) This helper iterates through the modified index and supplies both the pre-shift and post-shift keys per row.void
release()
Decrement the reference count on this object.toString()
boolean
valid()
-
Field Details
-
added
rows added (post-shift keyspace) -
removed
rows removed (pre-shift keyspace) -
modified
rows modified (post-shift keyspace) -
shifted
rows that shifted to new indices -
modifiedColumnSet
the set of columns that might have changed for rows in themodified()
index
-
-
Constructor Details
-
Update
public Update() -
Update
public Update(Index added, Index removed, Index modified, IndexShiftData shifted, ModifiedColumnSet modifiedColumnSet)
-
-
Method Details
-
acquire
Increment the reference count on this object.- Returns:
this
for convenience
-
release
public void release()Decrement the reference count on this object. -
empty
public boolean empty()- Returns:
- true if no changes occurred in this update
-
valid
public boolean valid()- Returns:
- true if all internal state is initialized
-
copy
Make a deep copy of this object.- Returns:
- a deep copy of this object
-
getModifiedPreShift
- Returns:
- a cached copy of the modified index in pre-shift keyspace
-
forAllModified
This helper iterates through the modified index and supplies both the pre-shift and post-shift keys per row.- Parameters:
consumer
- a consumer to feed the modified pre-shift and post-shift key values to.
-
toString
-
append
public com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput) - Specified by:
append
in interfacecom.fishlib.base.log.LogOutputAppendable
-