|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.AbstractStoreManager
org.datanucleus.store.neodatis.NeoDatisManager
public class NeoDatisManager
Store Manager for NeoDatis (http://www.neodatis.org/).
DataNucleus will select this StoreManager with URLs of the form "neodatis:...". Support for NeoDatis is for the following URLs
NeoDatis provides methods to hand out memory versions of the datastore objects. Each object has to be "activated" to have its values accessible. Similarly the object can be "deactivated" when it is no longer needed (freeing up resources, and the link to the disk object). When we retrieve an object from NeoDatis it activates the object. This makes all fields accessible. If however one of the fields is a PC object (or collection, or map, or array etc) that object itself is not activated. Consequently all fields are accessible from the start (unlike with RDBMS), but the StateManager manages the list of fields that are considered "loaded", and this is initially just those in the DFG (even though others are available). When the user accesses one of these "not-loaded" fields NeoDatisManager.fetchObject is called and that field is marked as loaded (if it is a SCO mutable it is wrapped, and if it is a PC object it has a StateManager connected and is activated).
Each object is persisted on its own, and we dont use NeoDatis's internal cascade mechanism. Instead the NeoDatisManager.insertObject, or NeoDatisManager.updateObject methods are called for each object that is to be persisted/updated. Each call to insertObject/updateObject provides reachability by use of PersistFieldManager.
Currently objects are deleted one by one since NeoDatis doesn't provide its own cascade delete process. We use DeleteFieldManager to navigate through the objec graph according to dependent field metadata.
Refer to ConnectionFactoryImpl. In simple terms each ObjectManager has a NeoDatis ODB associated with it, and this is retained until the end of life of the ObjectManager. With NeoDatis in server mode this allows use of multiple PMs on the same underlying datastore. With NeoDatis in file mode you can only have one PM operating on the same underlying datastore at once. This is a NeoDatis limitation rather than ours.
| Field Summary | |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER_NEODATIS
Localiser for messages. |
| Fields inherited from class org.datanucleus.store.AbstractStoreManager |
|---|
autoStartMechanism, fixedDatastore, LOCALISER, nontxConnectionFactoryName, omfContext, persistenceHandler, readOnlyDatastore, readOnlyDatastoreAction, schemaHandler, starter, starterInitialised, storeDataMgr, storeManagerKey, storeManagerRuntime, txConnectionFactoryName, valueGenerationMgr |
| Constructor Summary | |
|---|---|
NeoDatisManager(org.datanucleus.ClassLoaderResolver clr,
org.datanucleus.OMFContext omfContext)
Constructor for a new NeoDatis StoreManager. |
|
| Method Summary | |
|---|---|
void |
close()
Release of resources |
void |
deregisterODB(org.neodatis.odb.ODB odb)
Method to deregister an ODB from this store. |
java.util.Date |
getDatastoreDate()
Get the date/time of the datastore. |
org.datanucleus.store.Extent |
getExtent(org.datanucleus.ObjectManager om,
java.lang.Class c,
boolean subclasses)
Accessor for an Extent for a class. |
org.datanucleus.store.NucleusConnection |
getNucleusConnection(org.datanucleus.ObjectManager om)
Method to return a DataNucleus Connection for the ObjectManager. |
java.lang.Object |
getObjectIdForObject(org.datanucleus.ObjectManager om,
java.lang.Object pc)
Convenience method to get the identity for a Persistable object. |
java.util.Collection |
getSupportedOptions()
Accessor for the supported options in string form |
boolean |
isStrategyDatastoreAttributed(org.datanucleus.metadata.IdentityStrategy identityStrategy,
boolean datastoreIdentityField)
Check if the strategy is attributed by the database when the PersistenceCapable object is inserted into the database. |
void |
notifyObjectIsOutdated(org.datanucleus.StateManager sm)
Hook for the StateManager to notify us that an object is outdated (no longer valid). |
void |
registerODB(org.neodatis.odb.ODB odb)
Method to register an ODB as active on this store. |
protected void |
registerStoreData(org.datanucleus.store.StoreData data)
Method to register some data with the store. |
| Methods inherited from class org.datanucleus.store.AbstractStoreManager |
|---|
addClass, addClasses, assertReadOnlyForUpdateOfObject, clearAutoStarter, deregisterAllStoreData, getApiAdapter, getAutoStartMechanism, getBackingStoreForField, getClassNameForObjectID, getConnection, getConnection, getConnection, getMetaDataManager, getNucleusSequence, getOMFContext, getPersistenceHandler, getPropertiesForGenerator, getRuntimeManager, getSchemaHandler, getStoreManagerKey, getStrategyForNative, getStrategyValue, getStrategyValueForGenerator, getSubClassesForClass, getValueGenerationManager, initialiseAutoStart, logConfiguration, manageClassForIdentity, managesClass, newStoreData, performVersionCheck, printInformation, removeAllClasses, supportsQueryLanguage, supportsValueStrategy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER_NEODATIS
| Constructor Detail |
|---|
public NeoDatisManager(org.datanucleus.ClassLoaderResolver clr,
org.datanucleus.OMFContext omfContext)
clr - the ClassLoaderResolveromfContext - The corresponding ObjectManagerFactory omfContext.| Method Detail |
|---|
public void close()
close in interface org.datanucleus.store.StoreManagerclose in class org.datanucleus.store.AbstractStoreManagerpublic java.util.Date getDatastoreDate()
getDatastoreDate in interface org.datanucleus.store.StoreManagergetDatastoreDate in class org.datanucleus.store.AbstractStoreManagerpublic org.datanucleus.store.NucleusConnection getNucleusConnection(org.datanucleus.ObjectManager om)
getNucleusConnection in interface org.datanucleus.store.StoreManagergetNucleusConnection in class org.datanucleus.store.AbstractStoreManagerom - ObjectManager
protected void registerStoreData(org.datanucleus.store.StoreData data)
registerStoreData in class org.datanucleus.store.AbstractStoreManagerdata - The StoreData to addpublic void registerODB(org.neodatis.odb.ODB odb)
odb - ODBpublic void deregisterODB(org.neodatis.odb.ODB odb)
odb - ODBpublic void notifyObjectIsOutdated(org.datanucleus.StateManager sm)
notifyObjectIsOutdated in interface org.datanucleus.store.StoreManagernotifyObjectIsOutdated in class org.datanucleus.store.AbstractStoreManagersm - StateManager of object
public boolean isStrategyDatastoreAttributed(org.datanucleus.metadata.IdentityStrategy identityStrategy,
boolean datastoreIdentityField)
isStrategyDatastoreAttributed in interface org.datanucleus.store.StoreManagerisStrategyDatastoreAttributed in class org.datanucleus.store.AbstractStoreManageridentityStrategy - the identityStrategydatastoreIdentityField - Whether this is for the surrogate datastore identity field
public java.lang.Object getObjectIdForObject(org.datanucleus.ObjectManager om,
java.lang.Object pc)
om - The Object Managerpc - The object
public org.datanucleus.store.Extent getExtent(org.datanucleus.ObjectManager om,
java.lang.Class c,
boolean subclasses)
getExtent in interface org.datanucleus.store.StoreManagergetExtent in class org.datanucleus.store.AbstractStoreManagerom - The Object Managerc - The class requiring the Extentsubclasses - Whether to include subclasses of 'c'
public java.util.Collection getSupportedOptions()
getSupportedOptions in interface org.datanucleus.store.StoreManagergetSupportedOptions in class org.datanucleus.store.AbstractStoreManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||