|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.FederationManager
public class FederationManager
Federation Manager orchestrates the persistence in multiple datastores
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
Localisation of messages. |
| Constructor Summary | |
|---|---|
FederationManager(ClassLoaderResolver clr,
OMFContext omfContext)
|
|
| Method Summary | |
|---|---|
void |
addClass(java.lang.String className,
ClassLoaderResolver clr)
Method to add a class to the managed list for this datastore manager. |
void |
addClasses(java.lang.String[] classNames,
ClassLoaderResolver clr)
Add classes to the persistence model for the datastore. |
void |
close()
Release of resources. |
ApiAdapter |
getApiAdapter()
Accessor for the API adapter. |
AutoStartMechanism |
getAutoStartMechanism()
Accessor for the AutoStartMechanism |
Store |
getBackingStoreForField(ClassLoaderResolver clr,
AbstractMemberMetaData fmd,
java.lang.Class type)
Accessor for the backing store for the specified field. |
java.lang.String |
getClassNameForObjectID(java.lang.Object id,
ClassLoaderResolver clr,
ObjectManager om)
Returns the class corresponding to the given object identity. |
ManagedConnection |
getConnection(ObjectManager om)
Accessor for a transactional connection for the specified ObjectManager, using its current transaction. |
java.util.Date |
getDatastoreDate()
Get the date/time of the datastore. |
Extent |
getExtent(ObjectManager om,
java.lang.Class c,
boolean subclasses)
Interface to getting an Extent for a class. |
NucleusConnection |
getNucleusConnection(ObjectManager om)
Method to return a connection for the ObjectManager. |
NucleusSequence |
getNucleusSequence(ObjectManager om,
SequenceMetaData seqmd)
Method to return a datastore sequence for this datastore matching the passed sequence MetaData. |
OMFContext |
getOMFContext()
Gets the context for this ObjectManagerFactory |
StorePersistenceHandler |
getPersistenceHandler()
Accessor for the store persistence handler. |
ValueGenerationManager |
getPoidManager()
Accessor for the POIDManager for obtaining sequences. |
StoreManagerRuntime |
getRuntimeManager()
Accessor for the runtime management of this component (if specified as required to the PMF/EMF). |
StoreSchemaHandler |
getSchemaHandler()
Accessor for the store schema handler (if this datastore supports the concept of a schema). |
StoreManager |
getStoreManager()
|
java.lang.String |
getStoreManagerKey()
Accessor for the key for this store manager. |
java.lang.Object |
getStrategyValue(ObjectManager om,
AbstractClassMetaData cmd,
int absoluteFieldNumber)
Method to retrieve the value for a strategy for a particular field. |
java.util.HashSet |
getSubClassesForClass(java.lang.String className,
boolean includeDescendents,
ClassLoaderResolver clr)
Utility to return the names of the classes that are known subclasses of the provided class. |
java.util.Collection |
getSupportedOptions()
Accessor for the supported options in string form |
protected void |
initialiseStoreManager(ClassLoaderResolver clr)
Method to initialise the StoreManager used by this factory. |
boolean |
isStrategyDatastoreAttributed(IdentityStrategy identityStrategy,
boolean datastoreIdentityField)
Check if the strategy is attributed by the database when the PersistenceCapable object is inserted into the database |
java.lang.String |
manageClassForIdentity(java.lang.Object id,
ClassLoaderResolver clr)
Convenience method to ensure that the class defined by the passed OID/SingleFIeldIdentity is managed by the store. |
boolean |
managesClass(java.lang.String className)
Accessor for whether the specified class is managed currently |
void |
notifyObjectIsOutdated(StateManager sm)
Notifies this store manager that the main memory (RAM, heap) copy of the PC object of the supplied StateManager may not be regarded as valid anymore. |
void |
performVersionCheck(StateManager sm,
java.lang.Object versionDatastore,
VersionMetaData versionMetaData)
Perform an optimistic version check on the passed object, against the passed version in the datastore. |
void |
printInformation(java.lang.String category,
java.io.PrintStream ps)
Method to output particular information owned by this datastore. |
void |
removeAllClasses(ClassLoaderResolver clr)
Remove all classes from the persistence model for the datastore. |
boolean |
supportsQueryLanguage(java.lang.String language)
Accessor for whether this query language is supported. |
boolean |
supportsValueStrategy(java.lang.String language)
Accessor for whether this value strategy is supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
| Constructor Detail |
|---|
public FederationManager(ClassLoaderResolver clr,
OMFContext omfContext)
| Method Detail |
|---|
public OMFContext getOMFContext()
getOMFContext in interface StoreManagerprotected void initialiseStoreManager(ClassLoaderResolver clr)
clr - ClassLoaderResolver to use for class loading issuespublic StoreManager getStoreManager()
public void close()
StoreManager
close in interface StoreManager
public void addClass(java.lang.String className,
ClassLoaderResolver clr)
StoreManager
addClass in interface StoreManagerclassName - Name of the classclr - The ClassLoaderResolver
public void addClasses(java.lang.String[] classNames,
ClassLoaderResolver clr)
StoreManagerThis method is primarily useful for applications that wish to perform all of their datastore initialization up front, rather than wait for the runtime to do it on-demand.
addClasses in interface StoreManagerclassNames - The class(es) to be added.clr - The ClassLoaderResolverpublic ApiAdapter getApiAdapter()
StoreManager
getApiAdapter in interface StoreManagerpublic AutoStartMechanism getAutoStartMechanism()
StoreManagerAutoStartMechanism
getAutoStartMechanism in interface StoreManager
public Store getBackingStoreForField(ClassLoaderResolver clr,
AbstractMemberMetaData fmd,
java.lang.Class type)
StoreManager
getBackingStoreForField in interface StoreManagerclr - ClassLoader resolverfmd - MetaData for the field/propertytype - Type
public java.lang.String getClassNameForObjectID(java.lang.Object id,
ClassLoaderResolver clr,
ObjectManager om)
StoreManager
getClassNameForObjectID in interface StoreManagerid - The identity of some object.clr - ClassLoader resolverom - Object Manager
public java.util.Date getDatastoreDate()
StoreManager
getDatastoreDate in interface StoreManager
public Extent getExtent(ObjectManager om,
java.lang.Class c,
boolean subclasses)
StoreManager
getExtent in interface StoreManagerom - The Object Managerc - The class requiring the Extentsubclasses - Whether to include subclasses of 'c'
public NucleusConnection getNucleusConnection(ObjectManager om)
StoreManager
getNucleusConnection in interface StoreManagerom - ObjectManager
public NucleusSequence getNucleusSequence(ObjectManager om,
SequenceMetaData seqmd)
StoreManager
getNucleusSequence in interface StoreManagerom - The Object Managerseqmd - SequenceMetaData
public StoreSchemaHandler getSchemaHandler()
StoreManager
getSchemaHandler in interface StoreManagerpublic StorePersistenceHandler getPersistenceHandler()
StoreManager
getPersistenceHandler in interface StoreManagerpublic ValueGenerationManager getPoidManager()
StoreManager
getPoidManager in interface StoreManagerpublic StoreManagerRuntime getRuntimeManager()
StoreManager
getRuntimeManager in interface StoreManagerpublic java.lang.String getStoreManagerKey()
StoreManager
getStoreManagerKey in interface StoreManager
public java.lang.Object getStrategyValue(ObjectManager om,
AbstractClassMetaData cmd,
int absoluteFieldNumber)
StoreManager
getStrategyValue in interface StoreManagerom - The Object Managercmd - AbstractClassMetaData for the classabsoluteFieldNumber - The field number
public java.util.HashSet getSubClassesForClass(java.lang.String className,
boolean includeDescendents,
ClassLoaderResolver clr)
StoreManager
getSubClassesForClass in interface StoreManagerclassName - Class for which we search for subclasses.includeDescendents - Whether to include subclasses of subclasses etcclr - The ClassLoaderResolver
public boolean isStrategyDatastoreAttributed(IdentityStrategy identityStrategy,
boolean datastoreIdentityField)
StoreManager
isStrategyDatastoreAttributed in interface StoreManageridentityStrategy - the identityStrategydatastoreIdentityField - Whether this is for the surrogate datastore identity field
public java.lang.String manageClassForIdentity(java.lang.Object id,
ClassLoaderResolver clr)
StoreManager
manageClassForIdentity in interface StoreManagerid - OIDclr - ClassLoader resolver
public boolean managesClass(java.lang.String className)
StoreManager
managesClass in interface StoreManagerclassName - The name of the class
public void notifyObjectIsOutdated(StateManager sm)
StoreManager
notifyObjectIsOutdated in interface StoreManager
public void printInformation(java.lang.String category,
java.io.PrintStream ps)
throws java.lang.Exception
StoreManager
printInformation in interface StoreManagercategory - Category of informationps - PrintStream
java.lang.Exception - Thrown if an error occurs in the output process
public void performVersionCheck(StateManager sm,
java.lang.Object versionDatastore,
VersionMetaData versionMetaData)
StoreManager
performVersionCheck in interface StoreManagersm - StateManager of the object to checkversionDatastore - Version of the object in the datastoreversionMetaData - VersionMetaData to use for checkingpublic void removeAllClasses(ClassLoaderResolver clr)
StoreManager
removeAllClasses in interface StoreManagerclr - The ClassLoaderResolverpublic boolean supportsQueryLanguage(java.lang.String language)
StoreManager
supportsQueryLanguage in interface StoreManagerlanguage - The language
public boolean supportsValueStrategy(java.lang.String language)
StoreManager
supportsValueStrategy in interface StoreManagerlanguage - The strategy
public java.util.Collection getSupportedOptions()
StoreManager
getSupportedOptions in interface StoreManagerpublic ManagedConnection getConnection(ObjectManager om)
StoreManager
getConnection in interface StoreManagerom - The ObjectManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||