Package org.apache.openjpa.event
Class RemoteCommitEvent
java.lang.Object
org.apache.openjpa.event.RemoteCommitEvent
- All Implemented Interfaces:
Externalizable
,Serializable
Event type to hold the IDs of additions, updates, and
deletes. This event type is also fully serializable for remote communication.
- Since:
- 0.3.0
- Author:
- Patrick Linskey, Abe White
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Names of added, updated, and deleted classes only.static final int
The localBrokerFactory
detected that local data is out of date with the data store.static final int
Names of added classes, updated and deleted Object IDs.static final int
Names of added classes, added, updated and deleted Object IDs. -
Constructor Summary
ConstructorDescriptionConstructor used during externalization.RemoteCommitEvent
(int payloadType, Collection addIds, Collection addClasses, Collection updates, Collection deletes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionWhen the event type is not PAYLOAD_EXTENTS, return the set of object IDs for deleted objects.When the event type is PAYLOAD_EXTENTS, return the set of class names for the classes of deleted objects.int
The event PAYLOAD constant.When the event type is PAYLOAD_OIDS_WITH_ADDS, return the set of object IDs for added objects.For all event types, return the set of class names for the classes of inserted objects.When the event type is not PAYLOAD_EXTENTS, return the set of object IDs for updated objects.When the event type is PAYLOAD_EXTENTS, return the set of class names for the classes of updated objects.void
void
-
Field Details
-
PAYLOAD_OIDS
public static final int PAYLOAD_OIDSNames of added classes, updated and deleted Object IDs.- See Also:
-
PAYLOAD_OIDS_WITH_ADDS
public static final int PAYLOAD_OIDS_WITH_ADDSNames of added classes, added, updated and deleted Object IDs.- See Also:
-
PAYLOAD_EXTENTS
public static final int PAYLOAD_EXTENTSNames of added, updated, and deleted classes only.- See Also:
-
PAYLOAD_LOCAL_STALE_DETECTION
public static final int PAYLOAD_LOCAL_STALE_DETECTIONThe localBrokerFactory
detected that local data is out of date with the data store. Stale object IDs will be in t he updated set, although it is possible that records were actually deleted, rather than updated.- Since:
- 1.0.0
- See Also:
-
-
Constructor Details
-
RemoteCommitEvent
public RemoteCommitEvent()Constructor used during externalization. -
RemoteCommitEvent
public RemoteCommitEvent(int payloadType, Collection addIds, Collection addClasses, Collection updates, Collection deletes) Constructor. All collections will be proxied with unmodifiable views.- Parameters:
payloadType
- PAYLOAD constant for type of data in this eventaddIds
- set of object IDs for added instances, or nulladdClasses
- set of class names for added instancesupdates
- set of class names or object IDs for updated instancesdeletes
- set of class names or object IDs for deleted instances
-
-
Method Details
-
getPayloadType
public int getPayloadType()The event PAYLOAD constant. -
getPersistedObjectIds
When the event type is PAYLOAD_OIDS_WITH_ADDS, return the set of object IDs for added objects. This will only be callable when the backward compatability property transmitAddObjectIds is true. -
getUpdatedObjectIds
When the event type is not PAYLOAD_EXTENTS, return the set of object IDs for updated objects. When the event type is PAYLOAD_LOCAL_STALE_DETECTION, items in this list may actually have been deleted from the database. -
getDeletedObjectIds
When the event type is not PAYLOAD_EXTENTS, return the set of object IDs for deleted objects. -
getPersistedTypeNames
For all event types, return the set of class names for the classes of inserted objects. -
getUpdatedTypeNames
When the event type is PAYLOAD_EXTENTS, return the set of class names for the classes of updated objects. -
getDeletedTypeNames
When the event type is PAYLOAD_EXTENTS, return the set of class names for the classes of deleted objects. -
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-