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 IndexShiftDataExpanderEMPTYImmutable, re-usableIndexShiftDataExpanderfor 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 voidclose()IndexgetAdded()Fetch the resulting index of added values.IndexgetModified()Fetch the resulting index of modified values.IndexgetRemoved()Fetch the resulting index of removed values.voidvalidate(Index sourceIndex)Perform backwards compatible validation checks.
-
Field Details
-
EMPTY
Immutable, re-usableIndexShiftDataExpanderfor 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-
validate
Perform backwards compatible validation checks.- Parameters:
sourceIndex- the underlying index that apply to added/removed/modified
-