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, suspendpublic 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 CamelSagaServicepublic CompletableFuture<CamelSagaCoordinator> getSaga(String id)
getSaga in interface CamelSagaServicepublic void registerStep(CamelSagaStep step)
registerStep in interface CamelSagaServiceprotected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class ServiceSupportExceptionServiceSupport.doStop()protected void doStop() throws Exception
ServiceSupportServiceSupport.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 ServiceSupportExceptionServiceSupport.doStart()public ScheduledExecutorService getExecutorService()
public void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContextsetCamelContext in interface CamelContextAwarecamelContext - the Camel contextpublic CamelContext getCamelContext()
CamelContextAwareCamelContextgetCamelContext in interface CamelContextAwarepublic int getMaxRetryAttempts()
public void setMaxRetryAttempts(int maxRetryAttempts)
public long getRetryDelayInMilliseconds()
public void setRetryDelayInMilliseconds(long retryDelayInMilliseconds)
Apache Camel