Package xal.tools.correlator
Class BinAgent<R>
java.lang.Object
xal.tools.correlator.BinAgent<R>
BinAgent is the class that gathers correlated events. It is assigned a
timestamp. The agent listens for events and any event that is within the
timespan of timestamp, is accepted. When the number of accepted channels
equals the number of all channels monitored by the correlator, the bin agent
wraps all the gathered event records into a correlation object and notifies
the correlator world that it has found a correlation. The bin then resets
itself.
- Author:
- tap
-
Constructor Summary
ConstructorsConstructorDescriptionBinAgent
(MessageCenter localCenter, CorrelationTester<R> tester) Creates new BinAgent -
Method Summary
Modifier and TypeMethodDescriptionvoid
binTimespanChanged
(Correlator<?, R, ?> sender, double newTimespan) Implement StateNotice interface to listen for change of statevoid
correlationFilterChanged
(Correlator<?, R, ?> sender, CorrelationFilter<R> newFilter) Implement StateNotice interface to listen for change of statevoid
Implement BinUpdate interfacevoid
Register events for this bin agentvoid
reset()
Forget all eventsvoid
resetWithRecord
(String name, R aRecord, double timestamp) Forget all events and set the timestamp to the supplied one.void
setTimespan
(double timespan) Set the maximum time span allowed among the records collected.void
sourceAdded
(Correlator<?, R, ?> sender, String name, int newCount) Implement StateNotice interface to listen for change of statevoid
sourceRemoved
(Correlator<?, R, ?> sender, String name, int newCount) Implement StateNotice interface to listen for change of statevoid
willStartMonitoring
(Correlator<?, R, ?> sender) Implement StateNotice interface to listen for change of statevoid
willStopMonitoring
(Correlator<?, R, ?> sender) Implement StateNotice interface to listen for change of state
-
Constructor Details
-
BinAgent
Creates new BinAgent
-
-
Method Details
-
registerEvents
public void registerEvents()Register events for this bin agent -
reset
public void reset()Forget all events -
resetWithRecord
Forget all events and set the timestamp to the supplied one. This is used when a bin is recycled. -
setTimespan
public void setTimespan(double timespan) Set the maximum time span allowed among the records collected. -
newEvent
Implement BinUpdate interface -
sourceAdded
Implement StateNotice interface to listen for change of state -
sourceRemoved
Implement StateNotice interface to listen for change of state -
binTimespanChanged
Implement StateNotice interface to listen for change of state -
willStopMonitoring
Implement StateNotice interface to listen for change of state -
willStartMonitoring
Implement StateNotice interface to listen for change of state -
correlationFilterChanged
Implement StateNotice interface to listen for change of state
-