Module eclipselink
Class OracleChangeNotificationListener
- java.lang.Object
-
- org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener
-
- All Implemented Interfaces:
DatabaseEventListener
public class OracleChangeNotificationListener extends Object implements DatabaseEventListener
PUBLIC: Listener for Oracle Database Change event Notification (DCN). This allows the EclipseLink cache to be invalidated by database events.- Author:
- James Sutherland
- Since:
- EclipseLink 2.4
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor>descriptorsByTableMap each table to the descriptor that needs to be invalidated.static StringORA_TRANSACTION_IDprotected oracle.jdbc.dcn.DatabaseChangeRegistrationregisterThe Oracle JDBC registration object.static StringROWIDprotected ValueReadQuerytransactionIdQueryCache query for transaction id.
-
Constructor Summary
Constructors Constructor Description OracleChangeNotificationListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor>getDescriptorsByTable()INTERNAL: Return the mapping of tables to descriptors.oracle.jdbc.dcn.DatabaseChangeRegistrationgetRegister()INTERNAL: Return the database register.voidinitialize(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)Initialize the descriptor to receive database change events.voidregister(Session session)INTERNAL: Register the event listener with the database.voidremove(Session session)INTERNAL: Remove the event listener from the database.protected voidsetDescriptorsByTable(Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor> descriptorsByTable)INTERNAL: Set the mapping of tables to descriptors.protected voidsetRegister(oracle.jdbc.dcn.DatabaseChangeRegistration register)INTERNAL: Set the database register.
-
-
-
Field Detail
-
ORA_TRANSACTION_ID
public static String ORA_TRANSACTION_ID
-
ROWID
public static String ROWID
-
register
protected oracle.jdbc.dcn.DatabaseChangeRegistration register
The Oracle JDBC registration object.
-
descriptorsByTable
protected Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor> descriptorsByTable
Map each table to the descriptor that needs to be invalidated.
-
transactionIdQuery
protected ValueReadQuery transactionIdQuery
Cache query for transaction id.
-
-
Method Detail
-
register
public void register(Session session)
INTERNAL: Register the event listener with the database.- Specified by:
registerin interfaceDatabaseEventListener
-
initialize
public void initialize(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize the descriptor to receive database change events. This is called when the descriptor is initialized.- Specified by:
initializein interfaceDatabaseEventListener
-
remove
public void remove(Session session)
INTERNAL: Remove the event listener from the database.- Specified by:
removein interfaceDatabaseEventListener
-
getRegister
public oracle.jdbc.dcn.DatabaseChangeRegistration getRegister()
INTERNAL: Return the database register.
-
setRegister
protected void setRegister(oracle.jdbc.dcn.DatabaseChangeRegistration register)
INTERNAL: Set the database register.
-
getDescriptorsByTable
public Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor> getDescriptorsByTable()
INTERNAL: Return the mapping of tables to descriptors.
-
setDescriptorsByTable
protected void setDescriptorsByTable(Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor> descriptorsByTable)
INTERNAL: Set the mapping of tables to descriptors.
-
-