T - public class TurbineStreamingConnection<T extends TurbineData> extends java.lang.Object implements TurbineDataHandler<T>
ClusterMonitor
TurbineStreamingConnection provides the following functionality
RelevanceConfig
StreamingDataHandler listeners
| Modifier and Type | Class and Description |
|---|---|
static class |
TurbineStreamingConnection.UnitTest |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<java.lang.String> |
filterPrefixes |
protected java.lang.String |
name |
protected StreamingDataHandler |
streamHandler |
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Object> |
streamingConnectionSession
Signal controls used to co-ordinate the data handler thread and the ping thread.
|
protected int |
streamingDelay |
| Constructor and Description |
|---|
TurbineStreamingConnection(StreamingDataHandler sHandler,
java.util.Collection<TurbineStreamServlet.FilterCriteria> criteria,
int delay) |
| Modifier and Type | Method and Description |
|---|---|
PerformanceCriteria |
getCriteria()
Indicate how big a buffer and how many threads are required to dispatch data reliably to this handler
|
java.lang.String |
getName()
Name for identification purposes
|
void |
handleData(java.util.Collection<T> data)
Receive a collection of data from an turbine data monitor
|
void |
handleHostLost(Instance host)
Notification that a data monitor has gone away or stopped monitoring.
|
void |
waitOnConnection()
This will continue streaming responses and will block until the client connection breaks or the cluster monitor above fails to give data
|
protected void |
writeToStream(java.util.Collection<? extends TurbineData> dataCollection) |
protected final java.lang.String name
protected final StreamingDataHandler streamHandler
protected int streamingDelay
protected final java.util.Set<java.lang.String> filterPrefixes
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Object> streamingConnectionSession
public TurbineStreamingConnection(StreamingDataHandler sHandler, java.util.Collection<TurbineStreamServlet.FilterCriteria> criteria, int delay) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getName()
TurbineDataHandlergetName in interface TurbineDataHandler<T extends TurbineData>public void waitOnConnection()
public void handleData(java.util.Collection<T> data)
TurbineDataHandlerhandleData in interface TurbineDataHandler<T extends TurbineData>public void handleHostLost(Instance host)
TurbineDataHandlere.g when an InstanceMonitor shuts down due to a connection reset or when a aggregator cluster monitor has been stopped.
handleHostLost in interface TurbineDataHandler<T extends TurbineData>protected void writeToStream(java.util.Collection<? extends TurbineData> dataCollection)
public PerformanceCriteria getCriteria()
TurbineDataHandlergetCriteria in interface TurbineDataHandler<T extends TurbineData>