java.lang.Object
io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogOutput
All Implemented Interfaces:
CanFilterResultValue, Output, java.lang.AutoCloseable

public class CycleLogOutput
extends java.lang.Object
implements Output, CanFilterResultValue
A Output that writes cycles and results to an RLE-based file format. This output creates a file on disk and appends one or more (long,long,byte) tuples to it as buffering extents are filled. This tuple format represents the closed-open interval of cycles and the result associated with them. The file is expected to contain only cycle ranges in order.

It is valid for RLE segments to be broken apart into contiguous ranges. Any implementation should treat this as normal.

  • Constructor Summary

    Constructors 
    Constructor Description
    CycleLogOutput​(Activity activity)  
    CycleLogOutput​(java.io.File outputFile, int extentSizeInSpans)  
  • Method Summary

    Modifier and Type Method Description
    void close()  
    boolean onCycleResult​(long completedCycle, int result)
    Mark the result of the numbered cycle with an integer value.
    void onCycleResultSegment​(CycleResultsSegment segment)  
    void setFilter​(java.util.function.Predicate<ResultReadable> filter)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.nosqlbench.engine.api.activityapi.output.Output

    onCycleResult
  • Constructor Details

  • Method Details

    • onCycleResult

      public boolean onCycleResult​(long completedCycle, int result)
      Description copied from interface: Output
      Mark the result of the numbered cycle with an integer value. The meaning of the value provided is contextual to the way it is used. (Each process will have its own status tables, etc.)
      Specified by:
      onCycleResult in interface Output
      Parameters:
      completedCycle - The cycle number being marked.
      result - the result ordinal
      Returns:
      true on success, false if the marking should be retried differently
    • onCycleResultSegment

      public void onCycleResultSegment​(CycleResultsSegment segment)
      Specified by:
      onCycleResultSegment in interface Output
    • close

      public void close() throws java.lang.Exception
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface Output
      Throws:
      java.lang.Exception
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • setFilter

      public void setFilter​(java.util.function.Predicate<ResultReadable> filter)
      Specified by:
      setFilter in interface CanFilterResultValue