Package com.illumon.iris.db.v2
Class ReverseOperation
java.lang.Object
com.illumon.iris.db.v2.ReverseOperation
- All Implemented Interfaces:
QueryTable.MemoizableOperation,QueryTable.Operation
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.QueryTable.Operation
QueryTable.Operation.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninitialize(boolean usePrev, long beforeClock) Initialize this operation.newSwapListener(com.fishlib.io.logger.Logger log, QueryTable queryTable) longtransform(long outerIndex) Transform an outer (reversed) index to the inner (unreversed) index, or vice versa.Transform an outer (reversed) index to the inner (unreversed) index, or vice versa.longtransformPrev(long outerIndex) Transform an outer (reversed) index to the inner (unreversed) index as of the previous cycle, or vice versa.transformPrev(Index outerIndex) Transform an outer (reversed) index to the inner (unreversed) index as of the previous cycle, or vice versa.
-
Constructor Details
-
ReverseOperation
-
-
Method Details
-
getDescription
- Specified by:
getDescriptionin interfaceQueryTable.Operation- Returns:
- the description of this operation
-
getLogPrefix
- Specified by:
getLogPrefixin interfaceQueryTable.Operation- Returns:
- the log prefix of this operation
-
getMemoizedOperationKey
- Specified by:
getMemoizedOperationKeyin interfaceQueryTable.MemoizableOperation- Returns:
- the key that should be used to memoize off of
-
newSwapListener
public ShiftAwareSwapListener newSwapListener(com.fishlib.io.logger.Logger log, QueryTable queryTable) - Specified by:
newSwapListenerin interfaceQueryTable.Operation
-
initialize
Description copied from interface:QueryTable.OperationInitialize this operation.- Specified by:
initializein interfaceQueryTable.Operation- Parameters:
usePrev- data from the previous cycle should be used (otherwise use this cycle)beforeClock- the clock value that we captured before the function began; the function can use this value to bail out early if it notices something has gone wrong.- Returns:
- the result table / listener if successful, null if it should be retried.
-
transform
Transform an outer (reversed) index to the inner (unreversed) index, or vice versa.- Parameters:
indexToTransform- the outer index- Returns:
- the corresponding inner index
-
transformPrev
Transform an outer (reversed) index to the inner (unreversed) index as of the previous cycle, or vice versa.- Parameters:
outerIndex- the outer index- Returns:
- the corresponding inner index
-
transform
public long transform(long outerIndex) Transform an outer (reversed) index to the inner (unreversed) index, or vice versa.- Parameters:
outerIndex- the outer index- Returns:
- the corresponding inner index
-
transformPrev
public long transformPrev(long outerIndex) Transform an outer (reversed) index to the inner (unreversed) index as of the previous cycle, or vice versa.- Parameters:
outerIndex- the outer index- Returns:
- the corresponding inner index
-