Package org.graylog2.system.processing
Class MongoDBProcessingStatusRecorderService
java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.graylog2.system.processing.MongoDBProcessingStatusRecorderService
- All Implemented Interfaces:
com.google.common.util.concurrent.Service,ProcessingStatusRecorder
@Singleton
public class MongoDBProcessingStatusRecorderService
extends com.google.common.util.concurrent.AbstractIdleService
implements ProcessingStatusRecorder
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State -
Constructor Summary
ConstructorsConstructorDescriptionMongoDBProcessingStatusRecorderService(DBProcessingStatusService dbService, com.google.common.eventbus.EventBus eventBus, ServerStatus serverStatus, com.codahale.metrics.MetricRegistry metricRegistry, com.github.joschi.jadconfig.util.Duration persistInterval, ScheduledExecutorService scheduler) -
Method Summary
Modifier and TypeMethodDescriptionorg.joda.time.DateTimedoublelongdoubleReturns the nodeLifecyclestatus for the node.org.joda.time.DateTimeorg.joda.time.DateTimelongvoidhandleServerShutdown(Lifecycle lifecycle) protected voidshutDown()protected voidstartUp()voidupdateIngestReceiveTime(org.joda.time.DateTime newTimestamp) Update the receive time for the "ingest" measurement point.voidupdatePostIndexingReceiveTime(org.joda.time.DateTime newTimestamp) Update receive time for the "post-indexing" measurement point.voidupdatePostProcessingReceiveTime(org.joda.time.DateTime newTimestamp) Update the receive time for the "post-processing" measurement point.Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
-
Constructor Details
-
MongoDBProcessingStatusRecorderService
@Inject public MongoDBProcessingStatusRecorderService(DBProcessingStatusService dbService, com.google.common.eventbus.EventBus eventBus, ServerStatus serverStatus, com.codahale.metrics.MetricRegistry metricRegistry, @Named("processing_status_persist_interval") com.github.joschi.jadconfig.util.Duration persistInterval, @Named("daemonScheduler") ScheduledExecutorService scheduler)
-
-
Method Details
-
handleServerShutdown
-
startUp
protected void startUp()- Specified by:
startUpin classcom.google.common.util.concurrent.AbstractIdleService
-
shutDown
protected void shutDown()- Specified by:
shutDownin classcom.google.common.util.concurrent.AbstractIdleService
-
getNodeLifecycleStatus
Description copied from interface:ProcessingStatusRecorderReturns the nodeLifecyclestatus for the node.- Specified by:
getNodeLifecycleStatusin interfaceProcessingStatusRecorder- Returns:
- the node lifecycle status
-
getIngestReceiveTime
public org.joda.time.DateTime getIngestReceiveTime()- Specified by:
getIngestReceiveTimein interfaceProcessingStatusRecorder
-
getPostProcessingReceiveTime
public org.joda.time.DateTime getPostProcessingReceiveTime()- Specified by:
getPostProcessingReceiveTimein interfaceProcessingStatusRecorder
-
getPostIndexingReceiveTime
public org.joda.time.DateTime getPostIndexingReceiveTime()- Specified by:
getPostIndexingReceiveTimein interfaceProcessingStatusRecorder
-
getJournalInfoUncommittedEntries
public long getJournalInfoUncommittedEntries()- Specified by:
getJournalInfoUncommittedEntriesin interfaceProcessingStatusRecorder
-
getJournalInfoReadMessages1mRate
public double getJournalInfoReadMessages1mRate()- Specified by:
getJournalInfoReadMessages1mRatein interfaceProcessingStatusRecorder
-
getJournalInfoWrittenMessages1mRate
public double getJournalInfoWrittenMessages1mRate()- Specified by:
getJournalInfoWrittenMessages1mRatein interfaceProcessingStatusRecorder
-
getProcessBufferUsage
public long getProcessBufferUsage()- Specified by:
getProcessBufferUsagein interfaceProcessingStatusRecorder
-
updateIngestReceiveTime
public void updateIngestReceiveTime(org.joda.time.DateTime newTimestamp) Description copied from interface:ProcessingStatusRecorderUpdate the receive time for the "ingest" measurement point. This is done right before a raw messages gets written to the disk journal.- Specified by:
updateIngestReceiveTimein interfaceProcessingStatusRecorder- Parameters:
newTimestamp- the new timestamp to record
-
updatePostProcessingReceiveTime
public void updatePostProcessingReceiveTime(org.joda.time.DateTime newTimestamp) Description copied from interface:ProcessingStatusRecorderUpdate the receive time for the "post-processing" measurement point. This is done right after all message processors have run.- Specified by:
updatePostProcessingReceiveTimein interfaceProcessingStatusRecorder- Parameters:
newTimestamp- the new timestamp to record
-
updatePostIndexingReceiveTime
public void updatePostIndexingReceiveTime(org.joda.time.DateTime newTimestamp) Description copied from interface:ProcessingStatusRecorderUpdate receive time for the "post-indexing" measurement point. This is done right after messages have been written to Elasticsearch.- Specified by:
updatePostIndexingReceiveTimein interfaceProcessingStatusRecorder- Parameters:
newTimestamp- the new timestamp to record
-