public class ReachabilityAtCommitHandler extends Object
Constructor and Description |
---|
ReachabilityAtCommitHandler(ExecutionContext ec)
Constructor for a reachability-at-commit handler.
|
Modifier and Type | Method and Description |
---|---|
void |
addDeletedObject(Object id) |
void |
addEnlistedObject(Object id) |
void |
addFlushedNewObject(Object id) |
void |
addPersistedObject(Object id) |
void |
clear()
Method to clear the stored ids of objects involved in the reachability process.
|
void |
execute()
Method to perform the "persistence-by-reachability" at commit.
|
boolean |
isExecuting() |
boolean |
isObjectDeleted(Object id) |
boolean |
isObjectEnlisted(Object id) |
boolean |
isObjectFlushedNew(Object id) |
boolean |
isObjectPersisted(Object id) |
void |
swapObjectId(Object oldID,
Object newID)
Method that will allow swapping of an "id", for example when an object has recently been assigned its true "id".
|
public ReachabilityAtCommitHandler(ExecutionContext ec)
ec
- ExecutionContext that it is forpublic void clear()
public boolean isExecuting()
public void addEnlistedObject(Object id)
public boolean isObjectEnlisted(Object id)
public void addPersistedObject(Object id)
public boolean isObjectPersisted(Object id)
public void addDeletedObject(Object id)
public boolean isObjectDeleted(Object id)
public void addFlushedNewObject(Object id)
public boolean isObjectFlushedNew(Object id)
public void swapObjectId(Object oldID, Object newID)
oldID
- The old id that it is registered with. If this is null then we do nothingnewID
- The new id to use in placepublic void execute()
Copyright © 2019. All rights reserved.