public class CycleLogOutput extends Object implements Output, CanFilterResultValue
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 and Description |
|---|
CycleLogOutput(Activity activity) |
CycleLogOutput(File outputFile,
int extentSizeInSpans) |
| Modifier and Type | Method and 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(Predicate<ResultReadable> filter) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonCycleResultpublic CycleLogOutput(Activity activity)
public CycleLogOutput(File outputFile, int extentSizeInSpans)
public boolean onCycleResult(long completedCycle,
int result)
OutputonCycleResult in interface OutputcompletedCycle - The cycle number being marked.result - the result ordinalpublic void onCycleResultSegment(CycleResultsSegment segment)
onCycleResultSegment in interface Outputpublic void close()
throws Exception
close in interface Outputclose in interface AutoCloseableExceptionpublic void setFilter(Predicate<ResultReadable> filter)
setFilter in interface CanFilterResultValueCopyright © 2018. All rights reserved.