public class RetryOnStartFailureService
extends com.google.common.util.concurrent.AbstractService
Service
that wrap around another Service
such that, if the wrapped service failed
to start, it will get restarted based on the RetryStrategy
.Constructor and Description |
---|
RetryOnStartFailureService(com.google.common.base.Supplier<com.google.common.util.concurrent.Service> delegate,
RetryStrategy retryStrategy)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
String |
toString() |
public RetryOnStartFailureService(com.google.common.base.Supplier<com.google.common.util.concurrent.Service> delegate, RetryStrategy retryStrategy)
delegate
- a Supplier
that gives new instance of the delegating Service.retryStrategy
- strategy to use for retryingprotected void doStart()
doStart
in class com.google.common.util.concurrent.AbstractService
protected void doStop()
doStop
in class com.google.common.util.concurrent.AbstractService
public String toString()
toString
in class com.google.common.util.concurrent.AbstractService
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.