Interface SystemStateMonitor

  • All Known Implementing Classes:
    NoOpSystemStateMonitor

    public interface SystemStateMonitor
    A SystemStateMonitor provides methods for observing various state changes in the system.
    • 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.
      • 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.
      • 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.