Package org.graylog.failure
Class FailureHandlingService
java.lang.Object
com.google.common.util.concurrent.AbstractExecutionThreadService
org.graylog.failure.FailureHandlingService
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
@Singleton
public class FailureHandlingService
extends com.google.common.util.concurrent.AbstractExecutionThreadService
A service consuming and processing failure batches submitted via
FailureSubmissionQueue
.
The processing is done in a dedicated thread, the lifecycle of this service is managed
by ServiceManager
.
This service is designed with an idea of extensibility, so that Graylog plugins can inject
custom failure handlers via Multibinder
-
see FailureHandler
. If no custom handlers found,
then the fallback one will be picked instead.-
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
ConstructorDescriptionFailureHandlingService
(FailureHandler fallbackFailureHandler, Set<FailureHandler> failureHandlers, org.graylog.failure.FailureSubmissionQueue failureSubmissionQueue, Configuration configuration, MessageQueueAcknowledger acknowledger) -
Method Summary
Methods inherited from class com.google.common.util.concurrent.AbstractExecutionThreadService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
-
Constructor Details
-
Method Details
-
startUp
- Overrides:
startUp
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
- Throws:
Exception
-
shutDown
- Overrides:
shutDown
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
- Throws:
Exception
-
triggerShutdown
protected void triggerShutdown()- Overrides:
triggerShutdown
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
-
run
- Specified by:
run
in classcom.google.common.util.concurrent.AbstractExecutionThreadService
- Throws:
Exception
-