Package com.attivio.sysstate
Interface SystemStateMonitor
-
- All Known Implementing Classes:
NoOpSystemStateMonitor
public interface SystemStateMonitorA SystemStateMonitor provides methods for observing various state changes in the system.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSystemStateMonitor.ComponentEventThe series of events a component processing a message may go through.
-
Method Summary
All Methods Instance Methods Abstract 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.Collection<ComponentRuntimeState>getComponentStates()java.util.Collection<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 docIdOrUriOrThreadType)Starts an event.voidstopDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc, long durationInNano)Stops a document event.voidstopEvent(SystemStateMonitor.ComponentEvent event)Stops an event.
-
-
-
Method Detail
-
startEvent
void startEvent(SystemStateMonitor.ComponentEvent event, PlatformMessage msg, java.lang.String componentName, java.lang.String docIdOrUriOrThreadType)
Starts an event. Expectation is that a matching stopEvent call will occur. see ComponentEvent for expected sequence.
-
stopEvent
void stopEvent(SystemStateMonitor.ComponentEvent event)
Stops an event. Expectation is that this call matches a previous startEvent.
-
startDocumentEvent
void startDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc)
Starts a document event. Expectation is that a matching stopDocumentEvent call will occur.
-
stopDocumentEvent
void stopDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc, long durationInNano)
Stops a document event. Expectation is that this call matches a previous startDocumentEvent.
-
getComponentStates
java.util.Collection<ComponentRuntimeState> getComponentStates()
- Returns:
- the complete list of component runtime states
-
getComponentState
ComponentRuntimeState getComponentState(java.lang.String componentName)
- Parameters:
componentName-- Returns:
- the ComponentState for component
componentName
-
getDocumentStates
java.util.Collection<DocumentState> getDocumentStates()
- Returns:
- the complete list of DocumentStates
-
getNumDocumentsInFlight
int getNumDocumentsInFlight()
- Returns:
- the number of documents currently queued or being processed within the node
-
isDocumentPresent
boolean isDocumentPresent(java.util.UUID clientId, java.util.UUID correlationId)
-
isMessagePresent
boolean isMessagePresent(java.util.UUID clientId, java.lang.String msgId)
-
registerMetricsCollectorForComponent
void registerMetricsCollectorForComponent(java.lang.String componentName, MetricsCollector metricsCollector)Adds a metrics collector for this component.
-
getRegisteredMetricComponents
java.util.List<java.lang.String> getRegisteredMetricComponents()
-
getCollectedMetricsForComponent
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.
-
clearCollectedMetricsForComponent
void clearCollectedMetricsForComponent(java.lang.String fullyQualifiedComponentName, java.lang.Class<? extends MetricsCollector> metricsCollectorClass)Clears metrics from a monitor for a specified component.
-
-