|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.engine.ActionQueue
public class ActionQueue
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.
Constructor Summary | |
---|---|
ActionQueue(SessionImplementor session)
Constructs an action queue bound to the given session. |
Method Summary | |
---|---|
void |
addAction(BulkOperationCleanupAction cleanupAction)
|
void |
addAction(CollectionRecreateAction action)
|
void |
addAction(CollectionRemoveAction action)
|
void |
addAction(CollectionUpdateAction action)
|
void |
addAction(EntityDeleteAction action)
|
void |
addAction(EntityIdentityInsertAction insert)
|
void |
addAction(EntityInsertAction action)
|
void |
addAction(EntityUpdateAction action)
|
void |
afterTransactionCompletion(boolean success)
Performs cleanup of any held cache softlocks. |
boolean |
areInsertionsOrDeletionsQueued()
Check whether any insertion or deletion actions are currently queued. |
boolean |
areTablesToBeUpdated(Set tables)
Check whether the given tables/query-spaces are to be executed against given the currently queued actions. |
void |
beforeTransactionCompletion()
Execute any registered BeforeTransactionCompletionProcess |
void |
clear()
|
void |
clearFromFlushNeededCheck(int previousCollectionRemovalSize)
|
ArrayList |
cloneDeletions()
|
static ActionQueue |
deserialize(ObjectInputStream ois,
SessionImplementor session)
Used by the owning session to explicitly control deserialization of the action queue |
void |
execute(Executable executable)
|
void |
executeActions()
Perform all currently queued actions. |
void |
executeInserts()
Perform all currently queued entity-insertion actions. |
boolean |
hasAfterTransactionActions()
|
boolean |
hasAnyQueuedActions()
|
boolean |
hasBeforeTransactionActions()
|
int |
numberOfCollectionCreations()
|
int |
numberOfCollectionRemovals()
|
int |
numberOfCollectionUpdates()
|
int |
numberOfDeletions()
|
int |
numberOfInsertions()
|
int |
numberOfUpdates()
|
void |
prepareActions()
Prepares the internal action queues for execution. |
void |
registerProcess(AfterTransactionCompletionProcess process)
|
void |
registerProcess(BeforeTransactionCompletionProcess process)
|
void |
serialize(ObjectOutputStream oos)
Used by the owning session to explicitly control serialization of the action queue |
void |
sortActions()
|
void |
sortCollectionActions()
|
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ActionQueue(SessionImplementor session)
session
- The session "owning" this queue.Method Detail |
---|
public void clear()
public void addAction(EntityInsertAction action)
public void addAction(EntityDeleteAction action)
public void addAction(EntityUpdateAction action)
public void addAction(CollectionRecreateAction action)
public void addAction(CollectionRemoveAction action)
public void addAction(CollectionUpdateAction action)
public void addAction(EntityIdentityInsertAction insert)
public void addAction(BulkOperationCleanupAction cleanupAction)
public void registerProcess(AfterTransactionCompletionProcess process)
public void registerProcess(BeforeTransactionCompletionProcess process)
public void executeInserts() throws HibernateException
HibernateException
- error executing queued insertion actions.public void executeActions() throws HibernateException
HibernateException
- error executing queued actions.public void prepareActions() throws HibernateException
HibernateException
- error preparing actions.public void afterTransactionCompletion(boolean success)
success
- Was the transaction successful.public void beforeTransactionCompletion()
BeforeTransactionCompletionProcess
public boolean areTablesToBeUpdated(Set tables)
tables
- The table/query-spaces to check.
public boolean areInsertionsOrDeletionsQueued()
public void execute(Executable executable)
public String toString()
toString
in class Object
public int numberOfCollectionRemovals()
public int numberOfCollectionUpdates()
public int numberOfCollectionCreations()
public int numberOfDeletions()
public int numberOfUpdates()
public int numberOfInsertions()
public void sortCollectionActions()
public void sortActions()
public ArrayList cloneDeletions()
public void clearFromFlushNeededCheck(int previousCollectionRemovalSize)
public boolean hasAfterTransactionActions()
public boolean hasBeforeTransactionActions()
public boolean hasAnyQueuedActions()
public void serialize(ObjectOutputStream oos) throws IOException
oos
- The stream to which the action queue should get written
IOException
- Indicates an error writing to the streampublic static ActionQueue deserialize(ObjectInputStream ois, SessionImplementor session) throws IOException, ClassNotFoundException
ois
- The stream from which to read the action queuesession
- The session to which the action queue belongs
IOException
- indicates a problem reading from the stream
ClassNotFoundException
- Generally means we were unable to locate user classes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |