Class OracleChangeNotificationListener
java.lang.Object
org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener
- All Implemented Interfaces:
DatabaseEventListener
PUBLIC:
Listener for Oracle Database Change event Notification (DCN).
This allows the EclipseLink cache to be invalidated by database events.
- Author:
- James Sutherland
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<org.eclipse.persistence.internal.helper.DatabaseTable,
ClassDescriptor> Map each table to the descriptor that needs to be invalidated.static String
protected oracle.jdbc.dcn.DatabaseChangeRegistration
The Oracle JDBC registration object.static String
protected ValueReadQuery
Cache query for transaction id. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap<org.eclipse.persistence.internal.helper.DatabaseTable,
ClassDescriptor> INTERNAL: Return the mapping of tables to descriptors.oracle.jdbc.dcn.DatabaseChangeRegistration
INTERNAL: Return the database register.void
initialize
(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) Initialize the descriptor to receive database change events.void
INTERNAL: Register the event listener with the database.void
INTERNAL: Remove the event listener from the database.protected void
setDescriptorsByTable
(Map<org.eclipse.persistence.internal.helper.DatabaseTable, ClassDescriptor> descriptorsByTable) INTERNAL: Set the mapping of tables to descriptors.protected void
setRegister
(oracle.jdbc.dcn.DatabaseChangeRegistration register) INTERNAL: Set the database register.
-
Field Details
-
ORA_TRANSACTION_ID
-
ROWID
-
register
protected oracle.jdbc.dcn.DatabaseChangeRegistration registerThe Oracle JDBC registration object. -
descriptorsByTable
protected Map<org.eclipse.persistence.internal.helper.DatabaseTable,ClassDescriptor> descriptorsByTableMap each table to the descriptor that needs to be invalidated. -
transactionIdQuery
Cache query for transaction id.
-
-
Constructor Details
-
OracleChangeNotificationListener
public OracleChangeNotificationListener()
-
-
Method Details
-
register
INTERNAL: Register the event listener with the database.- Specified by:
register
in 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:
initialize
in interfaceDatabaseEventListener
-
remove
INTERNAL: Remove the event listener from the database.- Specified by:
remove
in 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.
-