public class InMemorySagaService extends ServiceSupport implements CamelSagaService
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_RETRY_ATTEMPTS |
static long |
DEFAULT_RETRY_DELAY_IN_MILLISECONDS |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
InMemorySagaService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
CamelContext |
getCamelContext()
Get the
CamelContext |
ScheduledExecutorService |
getExecutorService() |
int |
getMaxRetryAttempts() |
long |
getRetryDelayInMilliseconds() |
CompletableFuture<CamelSagaCoordinator> |
getSaga(String id) |
CompletableFuture<CamelSagaCoordinator> |
newSaga() |
void |
registerStep(CamelSagaStep step) |
void |
setCamelContext(CamelContext camelContext)
Injects the
CamelContext |
void |
setMaxRetryAttempts(int maxRetryAttempts) |
void |
setRetryDelayInMilliseconds(long retryDelayInMilliseconds) |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public static final int DEFAULT_MAX_RETRY_ATTEMPTS
public static final long DEFAULT_RETRY_DELAY_IN_MILLISECONDS
public InMemorySagaService()
public CompletableFuture<CamelSagaCoordinator> newSaga()
newSaga
in interface CamelSagaService
public CompletableFuture<CamelSagaCoordinator> getSaga(String id)
getSaga
in interface CamelSagaService
public void registerStep(CamelSagaStep step)
registerStep
in interface CamelSagaService
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
public ScheduledExecutorService getExecutorService()
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic CamelContext getCamelContext()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public int getMaxRetryAttempts()
public void setMaxRetryAttempts(int maxRetryAttempts)
public long getRetryDelayInMilliseconds()
public void setRetryDelayInMilliseconds(long retryDelayInMilliseconds)
Apache Camel