org.hibernate.engine.spi.ActionQueue Executable for
ensuring shared cache cleanup in relation to performed bulk HQL queries.
Implementation 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
clean up (we'd still need 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 | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final String[] | |
| private final Set | |
| private final Set | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public | BulkOperationCleanupAction(SharedSessionContractImplementor
The session to which this request is tied. session, EntityPersister... The affected entity persisters. affectedQueryables)Constructs an action to cleanup "affected cache regions" based on the affected entity persisters. |
| public | BulkOperationCleanupAction(SharedSessionContractImplementor
The session to which this request is tied. session, Set<String> 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: Whether the entity should be considered affectedThe 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 whether we should consider an entity as affected by the query. |
| public void | afterDeserialize(EventSource
The session being deserialized; must be an EventSource session)Implements org. |
| public void | beforeExecutions()
Implements org. |
| public void | |
| public AfterTransactionCompletionProcess | getAfterTransactionCompletionProcess()
Implements org. |
| public BeforeTransactionCompletionProcess | getBeforeTransactionCompletionProcess()
Implements org. |
| public String[] | getPropertySpaces()
Implements org. |
| public static void | |
| public static void | |
| public static void |
| affectedTableSpaces | back to summary |
|---|---|
| private final String[] affectedTableSpaces | |
| collectionCleanups | back to summary |
|---|---|
| private final Set<BulkOperationCleanupAction. | |
| entityCleanups | back to summary |
|---|---|
| private final Set<BulkOperationCleanupAction. | |
| naturalIdCleanups | back to summary |
|---|---|
| private final Set<BulkOperationCleanupAction. | |
| BulkOperationCleanupAction | back to summary |
|---|---|
| public BulkOperationCleanupAction(SharedSessionContractImplementor session, EntityPersister... 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(SharedSessionContractImplementor session, Set<String> 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<?> affectedTableSpaces, Serializable[] checkTableSpaces) Check whether we should consider an entity as affected by the query. This defines inclusion of the entity in the clean-up. Implementation Note An entity is considered to be affected if either (1) the affected table spaces are not known or (2) any of the incoming check table spaces occur in that set.
| |
| afterDeserialize | back to summary |
|---|---|
| public void afterDeserialize(EventSource session) Implements org. Doc from org. Reconnect to session after deserialization
| |
| 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 String[] getPropertySpaces() Implements org. Doc from org. What spaces (tables) are affected by this action? | |
| schedule | back to summary |
|---|---|
| public static void schedule(SharedSessionContractImplementor session, SqmDmlStatement<?> statement) | |
| schedule | back to summary |
|---|---|
| public static void schedule(SharedSessionContractImplementor session, EntityPersister... affectedQueryables) | |
| schedule | back to summary |
|---|---|
| public static void schedule(SharedSessionContractImplementor session, Set<String> affectedQueryables) | |
| Modifier and Type | Field and Description |
|---|---|
| private final CollectionDataAccess | |
| private final SoftLock |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| cacheAccess | back to summary |
|---|---|
| private final CollectionDataAccess cacheAccess | |
| cacheLock | back to summary |
|---|---|
| private final SoftLock cacheLock | |
| CollectionCleanup | back to summary |
|---|---|
| private CollectionCleanup(CollectionDataAccess cacheAccess, SharedSessionContractImplementor session) | |
| release | back to summary |
|---|---|
| private void release() | |
| Modifier and Type | Field and Description |
|---|---|
| private final EntityDataAccess | |
| private final SoftLock |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| cacheAccess | back to summary |
|---|---|
| private final EntityDataAccess cacheAccess | |
| cacheLock | back to summary |
|---|---|
| private final SoftLock cacheLock | |
| EntityCleanup | back to summary |
|---|---|
| private EntityCleanup(EntityDataAccess cacheAccess, SharedSessionContractImplementor session) | |
| release | back to summary |
|---|---|
| private void release() | |
| Modifier and Type | Field and Description |
|---|---|
| private final SoftLock | |
| private final NaturalIdDataAccess |
| Access | Constructor and Description |
|---|---|
| public | NaturalIdCleanup(NaturalIdDataAccess naturalIdCacheAccessStrategy, SharedSessionContractImplementor session)
|
| Modifier and Type | Method and Description |
|---|---|
| private void |
| cacheLock | back to summary |
|---|---|
| private final SoftLock cacheLock | |
| naturalIdCacheAccessStrategy | back to summary |
|---|---|
| private final NaturalIdDataAccess naturalIdCacheAccessStrategy | |
| NaturalIdCleanup | back to summary |
|---|---|
| public NaturalIdCleanup(NaturalIdDataAccess naturalIdCacheAccessStrategy, SharedSessionContractImplementor session) | |
| release | back to summary |
|---|---|
| private void release() | |