Package org.hibernate.action.internal
Class BulkOperationCleanupAction
java.lang.Object
org.hibernate.action.internal.BulkOperationCleanupAction
- All Implemented Interfaces:
Serializable
,Executable
An
ActionQueue
Executable
for
ensuring shared cache cleanup in relation to performed bulk HQL queries.- See Also:
- Implementation Note:
- Currently this executes for
INSERT
queries as well asUPDATE
andDELETE
queries. ForINSERT
it is really not needed as we'd have no invalid entity/collection data to clean up (we'd still need to invalidate the appropriate update-timestamps regions) as a result of this query.
-
Constructor Summary
ConstructorsConstructorDescriptionBulkOperationCleanupAction
(SharedSessionContractImplementor session, Set<String> tableSpaces) Constructs an action to cleanup "affected cache regions" based on a set of affected table spaces.BulkOperationCleanupAction
(SharedSessionContractImplementor session, EntityPersister... affectedQueryables) Constructs an action to cleanup "affected cache regions" based on the affected entity persisters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterDeserialize
(EventSource session) Reconnect to session after deserializationvoid
Called before executing any actions.void
execute()
Execute this action.Get the after-transaction-completion process, if any, for this action.Get the before-transaction-completion process, if any, for this action.String[]
What spaces (tables) are affected by this action?static void
schedule
(SharedSessionContractImplementor session, Set<String> affectedQueryables) static void
schedule
(SharedSessionContractImplementor session, EntityPersister... affectedQueryables) static void
schedule
(SharedSessionContractImplementor session, SqmDmlStatement<?> statement)
-
Constructor Details
-
Method Details
-
getPropertySpaces
Description copied from interface:Executable
What spaces (tables) are affected by this action?- Specified by:
getPropertySpaces
in interfaceExecutable
- Returns:
- The spaces affected by this action.
-
getBeforeTransactionCompletionProcess
Description copied from interface:Executable
Get the before-transaction-completion process, if any, for this action.- Specified by:
getBeforeTransactionCompletionProcess
in interfaceExecutable
- Returns:
- The before-transaction-completion process, or null if we have no before-transaction-completion process
-
getAfterTransactionCompletionProcess
Description copied from interface:Executable
Get the after-transaction-completion process, if any, for this action.- Specified by:
getAfterTransactionCompletionProcess
in interfaceExecutable
- Returns:
- The after-transaction-completion process, or null if we have no after-transaction-completion process
-
beforeExecutions
Description copied from interface:Executable
Called before executing any actions. Gives actions a chance to perform any preparation.- Specified by:
beforeExecutions
in interfaceExecutable
- Throws:
HibernateException
- Indicates a problem during preparation.
-
execute
Description copied from interface:Executable
Execute this action.- Specified by:
execute
in interfaceExecutable
- Throws:
HibernateException
- Indicates a problem during execution.
-
afterDeserialize
Description copied from interface:Executable
Reconnect to session after deserialization- Specified by:
afterDeserialize
in interfaceExecutable
- Parameters:
session
- The session being deserialized; must be an EventSource