Class NoSyncObjectStore
java.lang.Object
org.apache.cayenne.access.ObjectStore
org.apache.cayenne.access.NoSyncObjectStore
- All Implemented Interfaces:
Serializable, EventListener, SnapshotEventListener, GraphChangeHandler, GraphManager
An
ObjectStore which doesn't receive notifications
on parent's DataRowStore events.- Since:
- 3.1
- See Also:
-
Field Summary
Fields inherited from class ObjectStore
changes, context, dataRowCache, dataRowCacheSet, objectMap, trackedFlattenedPathsModifier and TypeFieldDescriptionprotected Map<Object, ObjectDiff> protected DataContextThe DataContext that owns this ObjectStore.protected DataRowStoreStores a reference to the DataRowStore.protected booleanprotected Map<Object, Persistent> protected Map<Object, Map<CayennePath, ObjectId>> Map that tracks flattened paths for given object Id that is present in db. -
Constructor Summary
ConstructorsConstructorDescriptionNoSyncObjectStore(DataRowStore dataRowCache, Map<Object, Persistent> objectMap) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetDataRowCache(DataRowStore dataRowCache) Sets parent DataRowStore.Methods inherited from class ObjectStore
arcCreated, arcDeleted, getCachedSnapshot, getContext, getDataRowCache, getFlattenedId, getFlattenedIds, getFlattenedPathIdMap, getNode, getObjectIterator, getSnapshot, hasChanges, markFlattenedPath, nodeCreated, nodeIdChanged, nodePropertyChanged, nodeRemoved, objectsInState, objectsRolledBack, objectsUnregistered, postprocessAfterCommit, registeredNodes, registeredObjectsCount, registerNode, setContext, snapshotsChanged, unregisterNodeModifier and TypeMethodDescriptionvoidarcCreated(Object nodeId, Object targetNodeId, ArcId arcId) Notifies implementing object that a new arc was created between two nodes.voidarcDeleted(Object nodeId, Object targetNodeId, ArcId arcId) Notifies implementing object that an arc between two nodes was deleted.Returns a snapshot for ObjectId from the underlying snapshot cache.Returns a DataRowStore associated with this ObjectStore.getFlattenedId(ObjectId objectId, CayennePath path) getFlattenedIds(ObjectId objectId) getFlattenedPathIdMap(ObjectId objectId) Returns a registered Persistent objects or null of no object exists for the ObjectId.Returns an iterator over the registered objects.getSnapshot(ObjectId oid) Returns a snapshot for ObjectId from the underlying snapshot cache.booleanReturnstrueif there are any modified, deleted or new objects registered with this ObjectStore,falseotherwise.voidmarkFlattenedPath(ObjectId objectId, CayennePath path, ObjectId id) Mark that flattened path for object has data row in DB.voidnodeCreated(Object nodeId) Notifies implementing object that a new node was created in the graph.voidnodeIdChanged(Object nodeId, Object newId) Does nothing.voidnodePropertyChanged(Object nodeId, String property, Object oldValue, Object newValue) Records dirty object snapshot.voidnodeRemoved(Object nodeId) Notifies implementing object that a node was removed from the graph.objectsInState(int state) Return a subset of registered objects that are in a certain persistence state.voidReverts changes to all stored uncomitted objects.voidobjectsUnregistered(Collection objects) Evicts a collection of Persistent objects from the ObjectStore, invalidates the underlying cache snapshots.voidpostprocessAfterCommit(GraphDiff parentChanges) Internal unsynchronized method to process objects state after commit.Returns all registered Persistent objects.intReturns a number of objects currently registered with this ObjectStore.voidregisterNode(Object nodeId, Object nodeObject) "Registers" a graph node, usually storing the node in some internal map using its id as a key.voidsetContext(DataContext context) voidsnapshotsChanged(SnapshotEvent event) SnapshotEventListener implementation that processes snapshot change event, updating Persistent objects that have the changes.unregisterNode(Object nodeId) "Unregisters" a graph node, forgetting any information associated with nodeId.
-
Constructor Details
-
NoSyncObjectStore
-
-
Method Details
-
setDataRowCache
Description copied from class:ObjectStoreSets parent DataRowStore. Registers to receive SnapshotEvents if the cache is configured to allow ObjectStores to receive such events.- Overrides:
setDataRowCachein classObjectStore
-