public class AsyncJobAddedNotification extends Object implements CommandContextCloseListener
Modifier and Type | Field and Description |
---|---|
protected AsyncExecutor |
asyncExecutor |
protected JobEntity |
job |
Constructor and Description |
---|
AsyncJobAddedNotification(JobEntity job,
AsyncExecutor asyncExecutor) |
Modifier and Type | Method and Description |
---|---|
void |
afterSessionsFlush(CommandContext commandContext)
Called when the
Session have been successfully flushed. |
void |
closed(CommandContext commandContext)
Called when the
CommandContext is successfully closed. |
void |
closeFailure(CommandContext commandContext)
Called when the
CommandContext has not been successfully closed due to an exception that happened. |
void |
closing(CommandContext commandContext)
Called when the
CommandContext is being closed, but no 'close logic' has been executed. |
protected JobEntity job
protected AsyncExecutor asyncExecutor
public AsyncJobAddedNotification(JobEntity job, AsyncExecutor asyncExecutor)
public void closed(CommandContext commandContext)
CommandContextCloseListener
CommandContext
is successfully closed.
At this point, the TransactionContext
(if applicable) has been successfully committed and no rollback has happened. All Session
instances have been closed.
Note that throwing an exception here does *not* affect the transaction. The CommandContext
will log the exception though.closed
in interface BaseCommandContextCloseListener<CommandContext>
closed
in interface CommandContextCloseListener
public void closing(CommandContext commandContext)
CommandContextCloseListener
CommandContext
is being closed, but no 'close logic' has been executed.
At this point, the TransactionContext
(if applicable) has not yet been committed/rolledback and none of the Session
instances have been flushed.
If an exception happens and it is not caught in this method: - The Session
instances will *not* be flushed - The TransactionContext
will be rolled back (if applicable)closing
in interface BaseCommandContextCloseListener<CommandContext>
closing
in interface CommandContextCloseListener
public void afterSessionsFlush(CommandContext commandContext)
CommandContextCloseListener
Session
have been successfully flushed. When an exception happened during the flushing of the sessions, this method will not be called.
If an exception happens and it is not caught in this method: - The Session
instances will *not* be flushed - The TransactionContext
will be rolled back (if applicable)afterSessionsFlush
in interface BaseCommandContextCloseListener<CommandContext>
afterSessionsFlush
in interface CommandContextCloseListener
public void closeFailure(CommandContext commandContext)
CommandContextCloseListener
CommandContext
has not been successfully closed due to an exception that happened.
Note that throwing an exception here does *not* affect the transaction. The CommandContext
will log the exception though.closeFailure
in interface BaseCommandContextCloseListener<CommandContext>
closeFailure
in interface CommandContextCloseListener
Copyright © 2017 Flowable. All rights reserved.