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 voidclearCollectedMetricsForComponent(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.ComponentRuntimeStategetComponentState(java.lang.String componentName)java.util.HashSet<ComponentRuntimeState>getComponentStates()java.util.HashSet<DocumentState>getDocumentStates()intgetNumDocumentsInFlight()java.util.List<java.lang.String>getRegisteredMetricComponents()booleanisDocumentPresent(java.util.UUID clientId, java.util.UUID correlationId)booleanisMessagePresent(java.util.UUID clientId, java.lang.String msgId)voidregisterMetricsCollectorForComponent(java.lang.String componentName, MetricsCollector metricsCollector)Adds a metrics collector for this component.voidstartDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc)Starts a document event.voidstartEvent(SystemStateMonitor.ComponentEvent event, PlatformMessage msg, java.lang.String componentName, java.lang.String docIdOrUri)Starts an event.voidstopDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc, long duration)Stops a document event.voidstopEvent(SystemStateMonitor.ComponentEvent event)Stops an event.
-
-
-
Method Detail
-
getComponentState
public ComponentRuntimeState getComponentState(java.lang.String componentName)
- Specified by:
getComponentStatein interfaceSystemStateMonitor- Returns:
- the ComponentState for component
componentName
-
getComponentStates
public java.util.HashSet<ComponentRuntimeState> getComponentStates()
- Specified by:
getComponentStatesin interfaceSystemStateMonitor- Returns:
- the complete list of component runtime states
-
getDocumentStates
public java.util.HashSet<DocumentState> getDocumentStates()
- Specified by:
getDocumentStatesin 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:
startEventin interfaceSystemStateMonitor
-
stopEvent
public void stopEvent(SystemStateMonitor.ComponentEvent event)
Stops an event. Expectation is that this call matches a previous startEvent.- Specified by:
stopEventin 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:
startDocumentEventin 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:
stopDocumentEventin interfaceSystemStateMonitor
-
registerMetricsCollectorForComponent
public void registerMetricsCollectorForComponent(java.lang.String componentName, MetricsCollector metricsCollector)Adds a metrics collector for this component.- Specified by:
registerMetricsCollectorForComponentin 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:
getCollectedMetricsForComponentin interfaceSystemStateMonitor
-
getRegisteredMetricComponents
public java.util.List<java.lang.String> getRegisteredMetricComponents()
- Specified by:
getRegisteredMetricComponentsin 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:
clearCollectedMetricsForComponentin interfaceSystemStateMonitor
-
isDocumentPresent
public boolean isDocumentPresent(java.util.UUID clientId, java.util.UUID correlationId)- Specified by:
isDocumentPresentin interfaceSystemStateMonitor
-
isMessagePresent
public boolean isMessagePresent(java.util.UUID clientId, java.lang.String msgId)- Specified by:
isMessagePresentin interfaceSystemStateMonitor
-
getNumDocumentsInFlight
public int getNumDocumentsInFlight()
- Specified by:
getNumDocumentsInFlightin interfaceSystemStateMonitor- Returns:
- the number of documents currently queued or being processed within the node
-
-