Responsible for maintaining the queue of actions related to events.
The ActionQueue holds the DML operations queued as part of a session's
transactional-write-behind semantics. DML operations are queued here
until a flush forces them to be executed against the database.
afterTransactionCompletion
public void afterTransactionCompletion(boolean success)
Performs cleanup of any held cache softlocks.
success
- Was the transaction successful.
areInsertionsOrDeletionsQueued
public boolean areInsertionsOrDeletionsQueued()
Check whether any insertion or deletion actions are currently queued.
- True if insertions or deletions are currently queued; false otherwise.
areTablesToBeUpdated
public boolean areTablesToBeUpdated(Set tables)
Check whether the given tables/query-spaces are to be executed against
given the currently queued actions.
tables
- The table/query-spaces to check.
- True if we contain pending actions against any of the given
tables; false otherwise.
clearFromFlushNeededCheck
public void clearFromFlushNeededCheck(int previousCollectionRemovalSize)
cloneDeletions
public ArrayList cloneDeletions()
deserialize
public static ActionQueue deserialize(ObjectInputStream ois,
SessionImplementor session)
throws IOException,
ClassNotFoundException
Used by the owning session to explicitly control deserialization of the
action queue
ois
- The stream from which to read the action queue
executeActions
public void executeActions()
throws HibernateException
Perform all currently queued actions.
executeInserts
public void executeInserts()
throws HibernateException
Perform all currently queued entity-insertion actions.
hasAfterTransactionActions
public boolean hasAfterTransactionActions()
hasAnyQueuedActions
public boolean hasAnyQueuedActions()
numberOfCollectionCreations
public int numberOfCollectionCreations()
numberOfCollectionRemovals
public int numberOfCollectionRemovals()
numberOfCollectionUpdates
public int numberOfCollectionUpdates()
numberOfDeletions
public int numberOfDeletions()
numberOfInsertions
public int numberOfInsertions()
numberOfUpdates
public int numberOfUpdates()
prepareActions
public void prepareActions()
throws HibernateException
Prepares the internal action queues for execution.
serialize
public void serialize(ObjectOutputStream oos)
throws IOException
Used by the owning session to explicitly control serialization of the
action queue
oos
- The stream to which the action queue should get written
sortActions
public void sortActions()
sortCollectionActions
public void sortCollectionActions()
toString
public String toString()
Returns a string representation of the object.
- a string representation of the object.