|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
org.apache.openjpa.event.RemoteCommitEventManager
public class RemoteCommitEventManager
Manager that can be used to track and notify
RemoteCommitListeners on remote commit events. If remote events
are enabled, this manager should be installed as a transaction listener on
all brokers so that it knows when commits are made.
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager |
|---|
_listeners |
| Constructor Summary | |
|---|---|
RemoteCommitEventManager(OpenJPAConfiguration conf)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addInternalListener(RemoteCommitListener listen)
Adds an OpenJPA-internal listener to this RemoteCommitEventManager. |
void |
addListener(RemoteCommitListener listen)
|
void |
afterCommit(TransactionEvent event)
Notification that a transaction has successfully committed. |
void |
afterCommitComplete(TransactionEvent event)
Notification that a transaction has successfully committed and the transaction is no longer active. |
void |
afterRollback(TransactionEvent event)
Notification that a transaction has been rolled back. |
void |
afterRollbackComplete(TransactionEvent event)
Notification that a transaction has been rolled back and the transaction is no longer active. |
void |
afterStateTransitions(TransactionEvent event)
Notification that state transitions are complete. |
boolean |
areRemoteEventsEnabled()
Return true if remote events are enabled. |
void |
beforeCommit(TransactionEvent event)
Notification that the next flush is for the transaction commit. |
void |
close()
Close this manager and all registered listeners. |
protected void |
fireEvent(java.lang.Object event,
java.lang.Object listener)
|
void |
fireLocalStaleNotification(java.lang.Object oid)
Fire an event to local listeners only notifying them of a detected stale record. |
RemoteCommitProvider |
getRemoteCommitProvider()
Return the RemoteCommitProvider that this manager uses. |
boolean |
getTransmitPersistedObjectIds()
Whether the oids of added instances will be transmitted. |
void |
setTransmitPersistedObjectIds(boolean transmit)
Whether the oids of added instances will be transmitted. |
| Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager |
|---|
addListener, fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, removeListener, setFailFast |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteCommitEventManager(OpenJPAConfiguration conf)
| Method Detail |
|---|
public boolean areRemoteEventsEnabled()
public RemoteCommitProvider getRemoteCommitProvider()
RemoteCommitProvider that this manager uses.
public boolean getTransmitPersistedObjectIds()
public void setTransmitPersistedObjectIds(boolean transmit)
public void addInternalListener(RemoteCommitListener listen)
addListener(org.apache.openjpa.event.RemoteCommitListener). This means that the external listeners can
rely on internal caches and data structures being up-to-date by the
time that they are invoked.
public void addListener(RemoteCommitListener listen)
public void close()
close in interface org.apache.openjpa.lib.util.Closeable
protected void fireEvent(java.lang.Object event,
java.lang.Object listener)
fireEvent in class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManagerpublic void fireLocalStaleNotification(java.lang.Object oid)
public void afterCommit(TransactionEvent event)
EndTransactionListener
afterCommit in interface EndTransactionListenerTransactionEvent.AFTER_COMMITpublic void beforeCommit(TransactionEvent event)
EndTransactionListener
beforeCommit in interface EndTransactionListenerTransactionEvent.BEFORE_COMMITpublic void afterRollback(TransactionEvent event)
EndTransactionListener
afterRollback in interface EndTransactionListenerTransactionEvent.AFTER_ROLLBACKpublic void afterCommitComplete(TransactionEvent event)
EndTransactionListener
afterCommitComplete in interface EndTransactionListenerTransactionEvent.AFTER_COMMIT_COMPLETEpublic void afterRollbackComplete(TransactionEvent event)
EndTransactionListener
afterRollbackComplete in interface EndTransactionListenerTransactionEvent.AFTER_ROLLBACK_COMPLETEpublic void afterStateTransitions(TransactionEvent event)
EndTransactionListener
afterStateTransitions in interface EndTransactionListenerTransactionEvent.AFTER_STATE_TRANSITIONS
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||