Package com.attivio.sysstate
Class NoOpSystemStateMonitor
- java.lang.Object
-
- com.attivio.sysstate.NoOpSystemStateMonitor
-
- All Implemented Interfaces:
SystemStateMonitor
public class NoOpSystemStateMonitor extends java.lang.Object implements SystemStateMonitor
A system state monitor that does no recording of system state. Used for establishing a baseline for testing or for disabling system state monitoring.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.attivio.sysstate.SystemStateMonitor
SystemStateMonitor.ComponentEvent
-
-
Constructor Summary
Constructors Constructor Description NoOpSystemStateMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCollectedMetricsForComponent(java.lang.String fullyQualifiedComponentName, java.lang.Class<? extends MetricsCollector> metricsCollectorClass)
Clears metrics from a monitor for a specified component.BaseTypesMap<java.lang.String,java.lang.Object>
getCollectedMetricsForComponent(java.lang.String fullyQualifiedComponentName, java.lang.Class<? extends MetricsCollector> metricsCollectorClass)
Get metrics from a monitor for a specified component.ComponentRuntimeState
getComponentState(java.lang.String componentName)
java.util.HashSet<ComponentRuntimeState>
getComponentStates()
java.util.HashSet<DocumentState>
getDocumentStates()
int
getNumDocumentsInFlight()
java.util.List<java.lang.String>
getRegisteredMetricComponents()
boolean
isDocumentPresent(java.util.UUID clientId, java.util.UUID correlationId)
boolean
isMessagePresent(java.util.UUID clientId, java.lang.String msgId)
void
registerMetricsCollectorForComponent(java.lang.String componentName, MetricsCollector metricsCollector)
Adds a metrics collector for this component.void
startDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc)
Starts a document event.void
startEvent(SystemStateMonitor.ComponentEvent event, PlatformMessage msg, java.lang.String componentName, java.lang.String docIdOrUri)
Starts an event.void
stopDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc, long duration)
Stops a document event.void
stopEvent(SystemStateMonitor.ComponentEvent event)
Stops an event.
-
-
-
Method Detail
-
getComponentState
public ComponentRuntimeState getComponentState(java.lang.String componentName)
- Specified by:
getComponentState
in interfaceSystemStateMonitor
- Returns:
- the ComponentState for component
componentName
-
getComponentStates
public java.util.HashSet<ComponentRuntimeState> getComponentStates()
- Specified by:
getComponentStates
in interfaceSystemStateMonitor
- Returns:
- the complete list of component runtime states
-
getDocumentStates
public java.util.HashSet<DocumentState> getDocumentStates()
- Specified by:
getDocumentStates
in interfaceSystemStateMonitor
- Returns:
- the complete list of DocumentStates
-
startEvent
public void startEvent(SystemStateMonitor.ComponentEvent event, PlatformMessage msg, java.lang.String componentName, java.lang.String docIdOrUri)
Starts an event. Expectation is that a matching stopEvent call will occur. see ComponentEvent for expected sequence.- Specified by:
startEvent
in interfaceSystemStateMonitor
-
stopEvent
public void stopEvent(SystemStateMonitor.ComponentEvent event)
Stops an event. Expectation is that this call matches a previous startEvent.- Specified by:
stopEvent
in interfaceSystemStateMonitor
-
startDocumentEvent
public void startDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc)
Starts a document event. Expectation is that a matching stopDocumentEvent call will occur.- Specified by:
startDocumentEvent
in interfaceSystemStateMonitor
-
stopDocumentEvent
public void stopDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc, long duration)
Stops a document event. Expectation is that this call matches a previous startDocumentEvent.- Specified by:
stopDocumentEvent
in interfaceSystemStateMonitor
-
registerMetricsCollectorForComponent
public void registerMetricsCollectorForComponent(java.lang.String componentName, MetricsCollector metricsCollector)
Adds a metrics collector for this component.- Specified by:
registerMetricsCollectorForComponent
in interfaceSystemStateMonitor
-
getCollectedMetricsForComponent
public BaseTypesMap<java.lang.String,java.lang.Object> getCollectedMetricsForComponent(java.lang.String fullyQualifiedComponentName, java.lang.Class<? extends MetricsCollector> metricsCollectorClass)
Get metrics from a monitor for a specified component.- Specified by:
getCollectedMetricsForComponent
in interfaceSystemStateMonitor
-
getRegisteredMetricComponents
public java.util.List<java.lang.String> getRegisteredMetricComponents()
- Specified by:
getRegisteredMetricComponents
in interfaceSystemStateMonitor
-
clearCollectedMetricsForComponent
public void clearCollectedMetricsForComponent(java.lang.String fullyQualifiedComponentName, java.lang.Class<? extends MetricsCollector> metricsCollectorClass)
Clears metrics from a monitor for a specified component.- Specified by:
clearCollectedMetricsForComponent
in interfaceSystemStateMonitor
-
isDocumentPresent
public boolean isDocumentPresent(java.util.UUID clientId, java.util.UUID correlationId)
- Specified by:
isDocumentPresent
in interfaceSystemStateMonitor
-
isMessagePresent
public boolean isMessagePresent(java.util.UUID clientId, java.lang.String msgId)
- Specified by:
isMessagePresent
in interfaceSystemStateMonitor
-
getNumDocumentsInFlight
public int getNumDocumentsInFlight()
- Specified by:
getNumDocumentsInFlight
in interfaceSystemStateMonitor
- Returns:
- the number of documents currently queued or being processed within the node
-
-