Package dev.dokimos.core
Class NoOpReporter
java.lang.Object
dev.dokimos.core.NoOpReporter
- All Implemented Interfaces:
Reporter,AutoCloseable
A no-op implementation of
Reporter that does nothing.
This is the default reporter used when no reporter is configured.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NoOpReporterSingleton instance of the no-op reporter. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Flushes pending items and releases resources.voidcompleteRun(RunHandle handle, RunStatus status) Marks a run as complete.voidflush()Blocks until all pending items are sent.voidreportItem(RunHandle handle, ItemResult result) Reports a single evaluated item.Starts a new experiment run.
-
Field Details
-
INSTANCE
Singleton instance of the no-op reporter.
-
-
Method Details
-
startRun
Description copied from interface:ReporterStarts a new experiment run. -
reportItem
Description copied from interface:ReporterReports a single evaluated item.This is called after each item completes evaluation, not batched at the end.
- Specified by:
reportItemin interfaceReporter- Parameters:
handle- the run handle fromReporter.startRun(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)result- the evaluated item result
-
completeRun
Description copied from interface:ReporterMarks a run as complete.- Specified by:
completeRunin interfaceReporter- Parameters:
handle- the run handle fromReporter.startRun(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)status- the final status of the run
-
flush
public void flush()Description copied from interface:ReporterBlocks until all pending items are sent.This is important for async implementations to ensure all data is transmitted before the experiment returns.
-
close
public void close()Description copied from interface:ReporterFlushes pending items and releases resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceReporter
-