Class BundleProgressReporter.InMemory
- java.lang.Object
-
- org.apache.beam.fn.harness.control.BundleProgressReporter.InMemory
-
- All Implemented Interfaces:
BundleProgressReporter,BundleProgressReporter.Registrar
- Enclosing interface:
- BundleProgressReporter
@NotThreadSafe public static class BundleProgressReporter.InMemory extends java.lang.Object implements BundleProgressReporter, BundleProgressReporter.Registrar
An in-memory bundle progress reporter and registrar.Synchronization must be provided between
register(org.apache.beam.fn.harness.control.BundleProgressReporter)andBundleProgressReportermethods to ensure that all registered reporters are seen.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.beam.fn.harness.control.BundleProgressReporter
BundleProgressReporter.InMemory, BundleProgressReporter.Registrar
-
-
Constructor Summary
Constructors Constructor Description InMemory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidregister(BundleProgressReporter reporter)Adds the reporter to be reported on.voidreset()Reset the monitoring data after a bundle has finished processing to be re-used for a future bundle.voidupdateFinalMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> monitoringData)Update the monitoring data for a bundle that has finished processing.voidupdateIntermediateMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> monitoringData)Update the monitoring data for a bundle that is currently being processed.
-
-
-
Method Detail
-
register
public void register(BundleProgressReporter reporter)
Description copied from interface:BundleProgressReporter.RegistrarAdds the reporter to be reported on. It is an error to add a reporter more than once.- Specified by:
registerin interfaceBundleProgressReporter.Registrar
-
updateIntermediateMonitoringData
public void updateIntermediateMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> monitoringData)
Description copied from interface:BundleProgressReporterUpdate the monitoring data for a bundle that is currently being processed.Must be invoked while holding the
ProcessBundleHandler.BundleProcessor.getProgressRequestLock().- Specified by:
updateIntermediateMonitoringDatain interfaceBundleProgressReporter
-
updateFinalMonitoringData
public void updateFinalMonitoringData(java.util.Map<java.lang.String,org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString> monitoringData)
Description copied from interface:BundleProgressReporterUpdate the monitoring data for a bundle that has finished processing.Must be invoked from the main bundle processing thread and while holding the
ProcessBundleHandler.BundleProcessor.getProgressRequestLock().- Specified by:
updateFinalMonitoringDatain interfaceBundleProgressReporter
-
reset
public void reset()
Description copied from interface:BundleProgressReporterReset the monitoring data after a bundle has finished processing to be re-used for a future bundle.Must be invoked from the main bundle processing thread and while holding the
ProcessBundleHandler.BundleProcessor.getProgressRequestLock().- Specified by:
resetin interfaceBundleProgressReporter
-
-