Class ReverseOperation

java.lang.Object
com.illumon.iris.db.v2.ReverseOperation
All Implemented Interfaces:
QueryTable.MemoizableOperation, QueryTable.Operation

public class ReverseOperation extends Object implements QueryTable.MemoizableOperation
  • Constructor Details

    • ReverseOperation

      public ReverseOperation(QueryTable parent)
  • Method Details

    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface QueryTable.Operation
      Returns:
      the description of this operation
    • getLogPrefix

      public String getLogPrefix()
      Specified by:
      getLogPrefix in interface QueryTable.Operation
      Returns:
      the log prefix of this operation
    • getMemoizedOperationKey

      public MemoizedOperationKey getMemoizedOperationKey()
      Specified by:
      getMemoizedOperationKey in interface QueryTable.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:
      newSwapListener in interface QueryTable.Operation
    • initialize

      public QueryTable.Operation.Result initialize(boolean usePrev, long beforeClock)
      Description copied from interface: QueryTable.Operation
      Initialize this operation.
      Specified by:
      initialize in interface QueryTable.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

      public Index transform(Index indexToTransform)
      Transform an outer (reversed) index to the inner (unreversed) index, or vice versa.
      Parameters:
      indexToTransform - the outer index
      Returns:
      the corresponding inner index
    • transformPrev

      public Index transformPrev(Index 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
    • 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