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
Fields Modifier and Type Field Description Index
added
rows added (post-shift keyspace)Index
modified
rows modified (post-shift keyspace)ModifiedColumnSet
modifiedColumnSet
the set of columns that might have changed for rows in themodified()
indexIndex
removed
rows removed (pre-shift keyspace)IndexShiftData
shifted
rows that shifted to new indices -
Constructor Summary
Constructors Constructor Description Update()
Update(Index added, Index removed, Index modified, IndexShiftData shifted, ModifiedColumnSet modifiedColumnSet)
-
Method Summary
Modifier and Type Method Description ShiftAwareListener.Update
acquire()
Increment the reference count on this object.com.fishlib.base.log.LogOutput
append(com.fishlib.base.log.LogOutput logOutput)
ShiftAwareListener.Update
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.Index
getModifiedPreShift()
void
release()
Decrement the reference count on this object.String
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. -
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
-