public class BulkOperationCleanupAction extends Object implements Executable, Serializable
ActionQueue Executable for ensuring
shared cache cleanup in relation to performed bulk HQL queries.
NOTE: currently this executes for INSERT queries as well as
UPDATE and DELETE queries. For INSERT it is
really not needed as we'd have no invalid entity/collection data to
cleanup (we'd still nee to invalidate the appropriate update-timestamps
regions) as a result of this query.| Constructor and Description |
|---|
BulkOperationCleanupAction(SharedSessionContractImplementor session,
Queryable... affectedQueryables)
Constructs an action to cleanup "affected cache regions" based on the
affected entity persisters.
|
BulkOperationCleanupAction(SharedSessionContractImplementor session,
Set tableSpaces)
Constructs an action to cleanup "affected cache regions" based on a
set of affected table spaces.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterDeserialize(SharedSessionContractImplementor session)
Reconnect to session after deserialization
|
void |
beforeExecutions()
Called before executing any actions.
|
void |
execute()
Execute this action.
|
AfterTransactionCompletionProcess |
getAfterTransactionCompletionProcess()
Get the after-transaction-completion process, if any, for this action.
|
BeforeTransactionCompletionProcess |
getBeforeTransactionCompletionProcess()
Get the before-transaction-completion process, if any, for this action.
|
Serializable[] |
getPropertySpaces()
What spaces (tables) are affected by this action?
|
public BulkOperationCleanupAction(SharedSessionContractImplementor session, Queryable... affectedQueryables)
session - The session to which this request is tied.affectedQueryables - The affected entity persisters.public BulkOperationCleanupAction(SharedSessionContractImplementor session, Set tableSpaces)
BulkOperationCleanupAction(SharedSessionContractImplementor, Queryable[])
in that here we have the affected table names. From those
we deduce the entity persisters which are affected based on the defined
table spaces; and from there, we
determine the affected collection regions based on any collections
in which those entity persisters participate as elements/keys/etc.session - The session to which this request is tied.tableSpaces - The table spaces.public Serializable[] getPropertySpaces()
ExecutablegetPropertySpaces in interface Executablepublic BeforeTransactionCompletionProcess getBeforeTransactionCompletionProcess()
ExecutablegetBeforeTransactionCompletionProcess in interface Executablepublic AfterTransactionCompletionProcess getAfterTransactionCompletionProcess()
ExecutablegetAfterTransactionCompletionProcess in interface Executablepublic void beforeExecutions()
throws HibernateException
ExecutablebeforeExecutions in interface ExecutableHibernateException - Indicates a problem during preparation.public void execute()
throws HibernateException
Executableexecute in interface ExecutableHibernateException - Indicates a problem during execution.public void afterDeserialize(SharedSessionContractImplementor session)
ExecutableafterDeserialize in interface Executablesession - The session being deserializedCopyright © 2019 JBoss by Red Hat. All rights reserved.