org.hibernate.engine.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.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Serializable[] | |
| private final Set | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public | BulkOperationCleanupAction(SessionImplementor
The session to which this request is tied. session, Queryable[] The affected entity persisters. affectedQueryables)Constructs an action to cleanup "affected cache regions" based on the affected entity persisters. |
| public | BulkOperationCleanupAction(SessionImplementor
The session to which this request is tied. session, Set<E> The table spaces. tableSpaces)Constructs an action to cleanup "affected cache regions" based on a set of affected table spaces. |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | Returns: True if there are affected table spaces and any of the incoming check table spaces occur in that set.The table spaces reported to be affected by
the query. affectedTableSpaces, Serializable[] The table spaces (from the entity persister)
to check against the affected table spaces. checkTableSpaces)Check to determine whether the table spaces reported by an entity persister match against the defined affected table spaces. |
| public void | beforeExecutions()
Implements org. |
| public void | |
| public AfterTransactionCompletionProcess | getAfterTransactionCompletionProcess()
Implements org. |
| public BeforeTransactionCompletionProcess | getBeforeTransactionCompletionProcess()
Implements org. |
| public Serializable[] | getPropertySpaces()
Implements org. |
| affectedTableSpaces | back to summary |
|---|---|
| private final Serializable[] affectedTableSpaces | |
| collectionCleanups | back to summary |
|---|---|
| private final Set<BulkOperationCleanupAction. | |
| entityCleanups | back to summary |
|---|---|
| private final Set<BulkOperationCleanupAction. | |
| BulkOperationCleanupAction | back to summary |
|---|---|
| public BulkOperationCleanupAction(SessionImplementor session, Queryable[] affectedQueryables) Constructs an action to cleanup "affected cache regions" based on the affected entity persisters. The affected regions are defined as the region (if any) of the entity persisters themselves, plus the collection regions for any collection in which those entity persisters participate as elements/keys/etc.
| |
| BulkOperationCleanupAction | back to summary |
|---|---|
| public BulkOperationCleanupAction(SessionImplementor session, Set<E> tableSpaces) Constructs an action to cleanup "affected cache regions" based on a
set of affected table spaces. This differs from
| |
| affectedEntity | back to summary |
|---|---|
| private boolean affectedEntity(Set<E> affectedTableSpaces, Serializable[] checkTableSpaces) Check to determine whether the table spaces reported by an entity persister match against the defined affected table spaces.
| |
| beforeExecutions | back to summary |
|---|---|
| public void beforeExecutions() throws HibernateException Implements org. Doc from org. Called before executing any actions. Gives actions a chance to perform any preparation.
| |
| execute | back to summary |
|---|---|
| public void execute() throws HibernateException Implements org. Doc from org. Execute this action
| |
| getAfterTransactionCompletionProcess | back to summary |
|---|---|
| public AfterTransactionCompletionProcess getAfterTransactionCompletionProcess() Implements org. Doc from org. Get the after-transaction-completion process, if any, for this action.
| |
| getBeforeTransactionCompletionProcess | back to summary |
|---|---|
| public BeforeTransactionCompletionProcess getBeforeTransactionCompletionProcess() Implements org. Doc from org. Get the before-transaction-completion process, if any, for this action.
| |
| getPropertySpaces | back to summary |
|---|---|
| public Serializable[] getPropertySpaces() Implements org. Doc from org. What spaces (tables) are affected by this action?
| |
| Modifier and Type | Field and Description |
|---|---|
| private final CollectionRegionAccessStrategy | |
| private final SoftLock |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| cacheAccess | back to summary |
|---|---|
| private final CollectionRegionAccessStrategy cacheAccess | |
| cacheLock | back to summary |
|---|---|
| private final SoftLock cacheLock | |
| CollectionCleanup | back to summary |
|---|---|
| private CollectionCleanup(CollectionRegionAccessStrategy cacheAccess) | |
| release | back to summary |
|---|---|
| private void release() | |
| Modifier and Type | Field and Description |
|---|---|
| private final EntityRegionAccessStrategy | |
| private final SoftLock |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| cacheAccess | back to summary |
|---|---|
| private final EntityRegionAccessStrategy cacheAccess | |
| cacheLock | back to summary |
|---|---|
| private final SoftLock cacheLock | |
| EntityCleanup | back to summary |
|---|---|
| private EntityCleanup(EntityRegionAccessStrategy cacheAccess) | |
| release | back to summary |
|---|---|
| private void release() | |