Class QueuePreventingScanSubmitter
java.lang.Object
uk.ac.diamond.daq.experiment.scans.mapping.QueuePreventingScanSubmitter
The goal of this scan submitter is to prevent scans from queueing.
This mechanism is useful for handling
ITrigger collisions.
Without it, scans would queue and quickly become out of sync with
the real events that triggered their submission.
When the queue is empty, the submitter will submit a ScanBean
as normal. When the queue is not empty, the behaviour depends on the
level of importance assigned to a scan:
submitScan(ScanBean)will throwScanningExceptionsubmitImportantScan(ScanBean)will clear the queue by aborting running invalid input: '&' submitted scans, and then submit the important scan.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetEventService(IEventService service) For OSGi/unit tests onlyvoidsubmitImportantScan(ScanBean scanBean) Submits the given scan, aborting any previously submitted and running scansvoidsubmitScan(ScanBean scanBean) Submits the given scan if the queue is empty, otherwise throws ScanningException
-
Constructor Details
-
QueuePreventingScanSubmitter
public QueuePreventingScanSubmitter()
-
-
Method Details
-
submitScan
Submits the given scan if the queue is empty, otherwise throws ScanningException- Throws:
EventExceptionScanningException
-
submitImportantScan
Submits the given scan, aborting any previously submitted and running scans- Throws:
EventException
-
setEventService
For OSGi/unit tests only
-