Package com.attivio.sysstate
Interface SystemStateMonitor
-
- All Known Implementing Classes:
NoOpSystemStateMonitor
public interface SystemStateMonitor
A SystemStateMonitor provides methods for observing various state changes in the system.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SystemStateMonitor.ComponentEvent
The series of events a component processing a message may go through.
-
Method Summary
All Methods Instance Methods Abstract 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.Collection<ComponentRuntimeState>
getComponentStates()
java.util.Collection<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 docIdOrUriOrThreadType)
Starts an event.void
stopDocumentEvent(PlatformMessage msg, java.lang.String componentName, IngestDocument doc, long durationInNano)
Stops a document event.void
stopEvent(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.
-
-