Package com.illumon.iris.db.v2.utils
Class IndexShiftDataExpander
java.lang.Object
com.illumon.iris.db.v2.utils.IndexShiftDataExpander
- All Implemented Interfaces:
SafeCloseable
,AutoCloseable
public class IndexShiftDataExpander extends Object implements SafeCloseable
Expands
ShiftAwareListener.onUpdate(ShiftAwareListener.Update)
's Update into a backward compatible
ARM (added, removed, modified) by expanding keyspace shifts.
Using this is almost always less efficient than using the Update directly.-
Field Summary
Fields Modifier and Type Field Description static IndexShiftDataExpander
EMPTY
Immutable, re-usableIndexShiftDataExpander
for an empty set of changes. -
Constructor Summary
Constructors Constructor Description IndexShiftDataExpander(ShiftAwareListener.Update update, Index sourceIndex)
Generates the backwards compatible ARM from an ARMS update. -
Method Summary
Modifier and Type Method Description void
close()
Index
getAdded()
Fetch the resulting index of added values.Index
getModified()
Fetch the resulting index of modified values.Index
getRemoved()
Fetch the resulting index of removed values.void
validate(Index sourceIndex)
Perform backwards compatible validation checks.
-
Field Details
-
EMPTY
Immutable, re-usableIndexShiftDataExpander
for an empty set of changes.
-
-
Constructor Details
-
IndexShiftDataExpander
Generates the backwards compatible ARM from an ARMS update.- Parameters:
update
- The usptream update.
-
-
Method Details
-
getAdded
Fetch the resulting index of added values.- Returns:
- added index
-
getRemoved
Fetch the resulting index of removed values.- Returns:
- removed index
-
getModified
Fetch the resulting index of modified values.- Returns:
- modified index
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSafeCloseable
-
validate
Perform backwards compatible validation checks.- Parameters:
sourceIndex
- the underlying index that apply to added/removed/modified
-