Interface ContextDerivedData.DerivedCalculator

Enclosing class:
ContextDerivedData

public static interface ContextDerivedData.DerivedCalculator
A way of actually doing the calculations.
  • Method Details

    • lookup

      Object lookup(Object row)
      Get the results of the calculation from the row. Allows some caching.
      Parameters:
      row - the row
      Returns:
      the result, perhaps a Long for retained size
    • calculate

      void calculate(ContextDerivedData.DerivedOperation operation, Object row, IProgressListener listener) throws SnapshotException
      Do the calculation for the row. Save the result in the row or elsewhere, ready for lookup(Object)
      Parameters:
      operation - the operation to do on the row to get the derived data
      row - the row
      listener - to indicate progress and exceptions
      Throws:
      SnapshotException - if there was a problem with the calculation