|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.sns.tools.correlator.Correlator
|
+--gov.sns.ca.correlator.ChannelCorrelator
ChannelCorrelator is a subclass of the Correlator specifically for correlating
channel monitor events. It adds convenience methods that make it easier
to add channels as sources. It implements newSourceAgent() to
generate a ChannelAgent as a source agent.
The Correlator is the class that is used to setup monitoring of correlated
events. It is the sole entry point to the outside world. When correlations
are found, the Correlator broadcasts the correlation.
Note that all time is in seconds unless otherwise stated.
| Field Summary |
| Fields inherited from class gov.sns.tools.correlator.Correlator |
_binTimespan, correlationTester, localCenter |
| Constructor Summary | |
ChannelCorrelator(double aBinTimespan)
Creates new ChannelCorrelator |
|
ChannelCorrelator(double aBinTimespan,
CorrelationFilter aFilter)
Creates new ChannelCorrelator. |
|
| Method Summary | |
void |
addChannel(Channel channel)
Add a channel to monitor. |
void |
addChannel(Channel channel,
RecordFilter recordFilter)
Add a channel to monitor. |
void |
addChannel(Channel channel,
java.lang.String channelId)
Add a channel to monitor. |
void |
addChannel(Channel channel,
java.lang.String channelId,
RecordFilter recordFilter)
Add a channel to monitor. |
void |
addChannel(java.lang.String channelId)
Add a channel to monitor. |
void |
addChannel(java.lang.String channelId,
RecordFilter recordFilter)
Add a channel to monitor. |
java.util.Collection |
inactiveChannelsByName()
Get the names of channels that are not being monitored due to connection or monitor failure or simply not monitoried. |
protected SourceAgent |
newSourceAgent(java.lang.Object source,
java.lang.String sourceName,
RecordFilter recordFilter)
Overrides the parent method to create and return a ChannelAgent as a source agent for this correlator. |
int |
numActiveChannels()
Get the number of actively monitored channels. |
int |
numInactiveChannels()
Get the number of channels that are inactive due to connection or monitor failure or simply not monitored. |
void |
removeAllChannels()
Remove all registered channels. |
void |
removeChannel(Channel channel)
Stop managing the specified channel. |
void |
removeChannel(java.lang.String channelId)
Stop managing the specified channel |
| Methods inherited from class gov.sns.tools.correlator.Correlator |
addListener, addSource, addSource, binTimespan, dispose, fetchCorrelationWithTimeout, getNamesOfSources, getSourceAgents, hasSource, isRunning, monitorWithTimeout, numSources, pulseMonitorWithTimeout, registerEvents, removeAllSources, removeListener, removeSource, setBinTimespan, setCorrelationFilter, startMonitoring, stopMonitoring |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ChannelCorrelator(double aBinTimespan)
public ChannelCorrelator(double aBinTimespan,
CorrelationFilter aFilter)
aBinTimespan - The time resolution for accepting two events as correlated.aFilter - A filter to apply to the correlation.| Method Detail |
protected SourceAgent newSourceAgent(java.lang.Object source,
java.lang.String sourceName,
RecordFilter recordFilter)
newSourceAgent in class Correlatorsource - The new source to monitor and correlate.sourceName - The name to be associated with the source.recordFilter - The filter to apply to the source's records.public int numActiveChannels()
public int numInactiveChannels()
public java.util.Collection inactiveChannelsByName()
public void addChannel(java.lang.String channelId)
channelId - The PV name to monitor.
public final void addChannel(java.lang.String channelId,
RecordFilter recordFilter)
channelId - The PV name to monitor.recordFilter - The filter to apply to the channel's records.public final void addChannel(Channel channel)
channel - The channel to monitor for correlations.
public final void addChannel(Channel channel,
RecordFilter recordFilter)
channel - The channel to monitor for correlations.recordFilter - The filter to apply to the channel's records.
public final void addChannel(Channel channel,
java.lang.String channelId)
channel - The channel to monitor for correlations.channelId - A unique identifier of the channel.
public final void addChannel(Channel channel,
java.lang.String channelId,
RecordFilter recordFilter)
channel - The channel to monitor for correlations.recordFilter - The filter to apply to the channel's records.public void removeChannel(Channel channel)
channel - The channel we are requesting to stop monitoring and correlating.public void removeChannel(java.lang.String channelId)
public void removeAllChannels()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||