Package org.datanucleus.store.federation
Class FederatedStoreManager
- java.lang.Object
-
- org.datanucleus.store.federation.FederatedStoreManager
-
- All Implemented Interfaces:
StoreManager
public class FederatedStoreManager extends Object implements StoreManager
A federated StoreManager orchestrates the persistence/retrieval for multiple datastores. It is responsible for creating the individual StoreManager instances for the datastore(s) that are being federated. Has a "primary" StoreManager where data is stored by default when no metadata is specified for a class, and then has a map of "secondary" StoreManagers keyed by name that can be used for persistence as defined in metadata. When a request comes in to persist some data, this class is responsible for selecting the appropriate StoreManager for persistence. When a request comes in to query some data, this class is responsible for selecting the appropriate StoreManager to query.Assumes that there are persistence properties of the form
datanucleus.datastore.SecondStore=secondstore.properties datanucleus.datastore.ThirdStore=thirdstore.properties
where these properties files have the properties for the secondary stores with names "SecondStore", "ThirdStore".
-
-
Field Summary
Fields Modifier and Type Field Description protected PersistenceNucleusContextnucleusContextprotected StorePersistenceHandlerpersistenceHandlerPersistence handler.protected StoreManagerprimaryStoreMgrPrimary StoreManager.static StringPROPERTY_DATA_FEDERATION_DATASTORE_NAMEprotected QueryManagerqueryMgrQuery Manager.protected Map<String,StoreManager>secondaryStoreMgrMapMap of secondary StoreManager keyed by their symbolic name.-
Fields inherited from interface org.datanucleus.store.StoreManager
OPTION_APPLICATION_COMPOSITE_ID, OPTION_APPLICATION_ID, OPTION_DATASTORE_ID, OPTION_DATASTORE_TIME_STORES_MILLISECS, OPTION_DATASTORE_TIME_STORES_NANOSECS, OPTION_DATASTORE_TIMEOUT, OPTION_NONDURABLE_ID, OPTION_ORM, OPTION_ORM_EMBEDDED_ARRAY, OPTION_ORM_EMBEDDED_ARRAY_NESTED, OPTION_ORM_EMBEDDED_COLLECTION, OPTION_ORM_EMBEDDED_COLLECTION_NESTED, OPTION_ORM_EMBEDDED_MAP, OPTION_ORM_EMBEDDED_MAP_NESTED, OPTION_ORM_EMBEDDED_PC, OPTION_ORM_EMBEDDED_PC_NESTED, OPTION_ORM_FOREIGN_KEYS, OPTION_ORM_INHERITANCE_COMPLETE_TABLE, OPTION_ORM_INHERITANCE_JOINED_TABLE, OPTION_ORM_INHERITANCE_SINGLE_TABLE, OPTION_ORM_SECONDARY_TABLE, OPTION_ORM_SERIALISED_ARRAY_ELEMENT, OPTION_ORM_SERIALISED_COLLECTION_ELEMENT, OPTION_ORM_SERIALISED_MAP_KEY, OPTION_ORM_SERIALISED_MAP_VALUE, OPTION_ORM_SERIALISED_PC, OPTION_QUERY_CANCEL, OPTION_QUERY_JDOQL_BITWISE_OPS, OPTION_QUERY_JDOQL_BULK_DELETE, OPTION_QUERY_JDOQL_BULK_INSERT, OPTION_QUERY_JDOQL_BULK_UPDATE, OPTION_QUERY_JPQL_BULK_DELETE, OPTION_QUERY_JPQL_BULK_INSERT, OPTION_QUERY_JPQL_BULK_UPDATE, OPTION_TRANSACTION_ACID, OPTION_TXN_ISOLATION_READ_COMMITTED, OPTION_TXN_ISOLATION_READ_UNCOMMITTED, OPTION_TXN_ISOLATION_REPEATABLE_READ, OPTION_TXN_ISOLATION_SERIALIZABLE, RELATION_IDENTITY_STORAGE_PERSISTABLE_IDENTITY
-
-
Constructor Summary
Constructors Constructor Description FederatedStoreManager(ClassLoaderResolver clr, PersistenceNucleusContext nucleusContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidenableSchemaGeneration()Convenience method to override the specified schema generation properties and enable schema generation.ApiAdaptergetApiAdapter()Accessor for the API adapter.BooleangetBooleanObjectProperty(String name)booleangetBooleanProperty(String name)booleangetBooleanProperty(String name, boolean resultIfNotSet)StringgetClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)Returns the class corresponding to the given object identity.ManagedConnectiongetConnection(int isolation_level)ManagedConnectiongetConnection(ExecutionContext ec)ManagedConnectiongetConnection(ExecutionContext ec, Map options)StringgetConnectionDriverName()Convenience accessor for the driver name to use for the connections (where supported).ObjectgetConnectionFactory()Convenience accessor for the primary connection factory (when a factory was provided by the user).ObjectgetConnectionFactory2()Convenience accessor for the secondary connection factory (when a factory was provided by the user).StringgetConnectionFactory2Name()Convenience accessor for the factory (JNDI) name for the secondary connection factory (when provided by the user).StringgetConnectionFactoryName()Convenience accessor for the factory (JNDI) name for the primary connection factory (when provided by the user).ConnectionManagergetConnectionManager()Accessor for the connection manager for this store manager.StringgetConnectionPassword()Convenience accessor for the password to use for the connections (where required).StringgetConnectionURL()Convenience accessor for the URL for the connections.StringgetConnectionUserName()Convenience accessor for the user name to use for the connections (where required).DategetDatastoreDate()Get the date/time of the datastore.StringgetDefaultStateManagerClassName()ExtentgetExtent(ExecutionContext ec, Class c, boolean subclasses)Interface to getting an Extent for a class.FlushProcessgetFlushProcess()intgetIntProperty(String name)MetaDataManagergetMetaDataManager()NamingFactorygetNamingFactory()StringgetNativeQueryLanguage()Accessor for the native query language of this store.NucleusConnectiongetNucleusConnection(ExecutionContext ec)Method to return a connection to the user for the ExecutionContext.PersistenceNucleusContextgetNucleusContext()Accessor for the context in which this StoreManager is running.NucleusSequencegetNucleusSequence(ExecutionContext ec, SequenceMetaData seqmd)Method to return a datastore sequence for this datastore matching the passed sequence MetaData.StorePersistenceHandlergetPersistenceHandler()ObjectgetProperty(String name)StringgetQueryCacheKey()Accessor for the key used for representing this store manager in the query cache.QueryManagergetQueryManager()StoreSchemaHandlergetSchemaHandler()StoreDatagetStoreDataForClass(String className)StoreManagergetStoreManagerForClass(String className, ClassLoaderResolver clr)Accessor for the StoreManager to use for the specified class.StoreManagergetStoreManagerForClass(AbstractClassMetaData cmd)Accessor for the StoreManager to use for persisting the specified class.StringgetStoreManagerKey()Accessor for the key for this store manager.StringgetStringProperty(String name)Collection<String>getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)Utility to return the names of the classes that are known subclasses of the provided class.CollectiongetSupportedOptions()Strings representing features that are supported by this datastore.Collection<String>getSupportedQueryLanguages()Accessor for the supported query languages.ValueGenerationManagergetValueGenerationManager()Accessor for the ValueGenerationManager for generating field values.StringgetValueGenerationStrategyForNative(AbstractClassMetaData cmd)Method defining which value-strategy to use when the user specifies "native"/"auto" on datastore-identity.StringgetValueGenerationStrategyForNative(AbstractMemberMetaData mmd)Method defining which value-strategy to use when the user specifies "native"/"auto" on a memberObjectgetValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)Method to retrieve the value for a value generation strategy for a particular field or datastore-identity.booleanhasProperty(String name)booleanisClosed()booleanisJdbcStore()Returns whether the datastore is a "JDBC datastore".booleanisValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)Convenience method to return whether the value generation strategy used by the specified class/member is generated in the datastore during a persist.voidmanageClasses(ClassLoaderResolver clr, String... classNames)Manage the specified classes.StringmanageClassForIdentity(Object id, ClassLoaderResolver clr)Convenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.booleanmanagesClass(String className)Accessor for whether the specified class is managed currentlyQuerynewQuery(String language, ExecutionContext ec)Method to return a new query, for the specified language and ExecutionContext.QuerynewQuery(String language, ExecutionContext ec, String queryString)Method to return a new query, for the specified language and ExecutionContext, using the specified query string.QuerynewQuery(String language, ExecutionContext ec, Query q)Method to return a new query, for the specified language and ExecutionContext, using the specified existing query to copy from.voidprintInformation(String category, PrintStream ps)Method to output particular information owned by this datastore.voidresetSchemaGeneration()Convenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.booleansupportsQueryLanguage(String language)Accessor for whether this query language is supported.booleansupportsValueGenerationStrategy(String language)Accessor for whether this value generation strategy is supported.voidtransactionCommitted(ExecutionContext ec)Method to inform the StoreManager that a transaction has committed for the specified execution context.voidtransactionRolledBack(ExecutionContext ec)Method to inform the StoreManager that a transaction has rolled back for the specified execution context.voidtransactionStarted(ExecutionContext ec)Method to inform the StoreManager that a transaction has started for the specified execution context.voidunmanageAllClasses(ClassLoaderResolver clr)Remove all classes from the persistence model for the datastore.voidunmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)Method to remove knowledge of the specified class from this StoreManager.booleanuseBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)Method to return whether the specified member should use a backed SCO wrapper.booleanusesBackedSCOWrappers()Whether this store manager uses backing-store based SCO wrappers.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.datanucleus.store.StoreManager
getDefaultCatalogName, getDefaultSchemaName
-
-
-
-
Field Detail
-
PROPERTY_DATA_FEDERATION_DATASTORE_NAME
public static final String PROPERTY_DATA_FEDERATION_DATASTORE_NAME
- See Also:
- Constant Field Values
-
primaryStoreMgr
protected StoreManager primaryStoreMgr
Primary StoreManager.
-
secondaryStoreMgrMap
protected Map<String,StoreManager> secondaryStoreMgrMap
Map of secondary StoreManager keyed by their symbolic name.
-
nucleusContext
protected PersistenceNucleusContext nucleusContext
-
persistenceHandler
protected StorePersistenceHandler persistenceHandler
Persistence handler.
-
queryMgr
protected QueryManager queryMgr
Query Manager. Lazy initialised, so use getQueryManager() to access.
-
-
Constructor Detail
-
FederatedStoreManager
public FederatedStoreManager(ClassLoaderResolver clr, PersistenceNucleusContext nucleusContext)
-
-
Method Detail
-
getNucleusContext
public PersistenceNucleusContext getNucleusContext()
Description copied from interface:StoreManagerAccessor for the context in which this StoreManager is running.- Specified by:
getNucleusContextin interfaceStoreManager- Returns:
- Returns the context.
-
getMetaDataManager
public MetaDataManager getMetaDataManager()
- Specified by:
getMetaDataManagerin interfaceStoreManager
-
getFlushProcess
public FlushProcess getFlushProcess()
- Specified by:
getFlushProcessin interfaceStoreManager
-
close
public void close()
- Specified by:
closein interfaceStoreManager
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceStoreManager
-
getStoreManagerForClass
public StoreManager getStoreManagerForClass(AbstractClassMetaData cmd)
Accessor for the StoreManager to use for persisting the specified class. TODO Extend this so that we can persist some objects of one type into one datastore, and other objects of that type into a different datastore.- Parameters:
cmd- Metadata for the class- Returns:
- The StoreManager to use
-
getStoreManagerForClass
public StoreManager getStoreManagerForClass(String className, ClassLoaderResolver clr)
Accessor for the StoreManager to use for the specified class.- Parameters:
className- Name of the classclr- ClassLoader resolver- Returns:
- The StoreManager to use
-
manageClasses
public void manageClasses(ClassLoaderResolver clr, String... classNames)
Description copied from interface:StoreManagerManage the specified classes. This 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.- Specified by:
manageClassesin interfaceStoreManager- Parameters:
clr- The ClassLoaderResolverclassNames- The class(es) to be managed
-
getNamingFactory
public NamingFactory getNamingFactory()
- Specified by:
getNamingFactoryin interfaceStoreManager
-
getApiAdapter
public ApiAdapter getApiAdapter()
Description copied from interface:StoreManagerAccessor for the API adapter.- Specified by:
getApiAdapterin interfaceStoreManager- Returns:
- API adapter
-
getClassNameForObjectID
public String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ExecutionContext ec)
Description copied from interface:StoreManagerReturns the class corresponding to the given object identity. If the object is datastore-identity, return the PC class specified in the identity. If the object is single-field identity, return the PC class specified in the identity If the object is an AppID PK, return the PC class that uses it. If the object is a SCOID, return the SCO class. If the object is a persistable class, return the class.- Specified by:
getClassNameForObjectIDin interfaceStoreManager- Parameters:
id- The identity of some object.clr- ClassLoader resolverec- execution context- Returns:
- For datastore identity, return the class of the corresponding object. For application identity, return the class of the corresponding object or null if object does not exist.
-
getDatastoreDate
public Date getDatastoreDate()
Description copied from interface:StoreManagerGet the date/time of the datastore.- Specified by:
getDatastoreDatein interfaceStoreManager- Returns:
- Date/time of the datastore
-
getExtent
public Extent getExtent(ExecutionContext ec, Class c, boolean subclasses)
Description copied from interface:StoreManagerInterface to getting an Extent for a class.- Specified by:
getExtentin interfaceStoreManager- Parameters:
ec- execution contextc- The class requiring the Extentsubclasses- Whether to include subclasses of 'c'- Returns:
- The Extent.
-
isJdbcStore
public boolean isJdbcStore()
Description copied from interface:StoreManagerReturns whether the datastore is a "JDBC datastore". If it is then the JDO spec needs to return a connection that implements java.sql.Connection. RDBMS is the only one that will return true from here (or certainly as we can foresee now).- Specified by:
isJdbcStorein interfaceStoreManager- Returns:
- Whether this is a JDBC datastore
-
getNucleusConnection
public NucleusConnection getNucleusConnection(ExecutionContext ec)
Description copied from interface:StoreManagerMethod to return a connection to the user for the ExecutionContext. Typically provides a wrapper to the currently in-use ManagedConnection.- Specified by:
getNucleusConnectionin interfaceStoreManager- Parameters:
ec- execution context- Returns:
- The datastore Connection
-
getNucleusSequence
public NucleusSequence getNucleusSequence(ExecutionContext ec, SequenceMetaData seqmd)
Description copied from interface:StoreManagerMethod to return a datastore sequence for this datastore matching the passed sequence MetaData.- Specified by:
getNucleusSequencein interfaceStoreManager- Parameters:
ec- execution contextseqmd- SequenceMetaData- Returns:
- The Sequence
-
getSchemaHandler
public StoreSchemaHandler getSchemaHandler()
- Specified by:
getSchemaHandlerin interfaceStoreManager
-
getStoreDataForClass
public StoreData getStoreDataForClass(String className)
- Specified by:
getStoreDataForClassin interfaceStoreManager
-
getPersistenceHandler
public StorePersistenceHandler getPersistenceHandler()
- Specified by:
getPersistenceHandlerin interfaceStoreManager
-
getQueryManager
public QueryManager getQueryManager()
- Specified by:
getQueryManagerin interfaceStoreManager
-
getSupportedQueryLanguages
public Collection<String> getSupportedQueryLanguages()
Description copied from interface:StoreManagerAccessor for the supported query languages.- Specified by:
getSupportedQueryLanguagesin interfaceStoreManager- Returns:
- The supported query languages
-
newQuery
public Query newQuery(String language, ExecutionContext ec)
Description copied from interface:StoreManagerMethod to return a new query, for the specified language and ExecutionContext.- Specified by:
newQueryin interfaceStoreManager- Parameters:
language- The query languageec- ExecutionContext- Returns:
- The query
-
newQuery
public Query newQuery(String language, ExecutionContext ec, String queryString)
Description copied from interface:StoreManagerMethod to return a new query, for the specified language and ExecutionContext, using the specified query string.- Specified by:
newQueryin interfaceStoreManager- Parameters:
language- The query languageec- ExecutionContextqueryString- The query string- Returns:
- The query
-
newQuery
public Query newQuery(String language, ExecutionContext ec, Query q)
Description copied from interface:StoreManagerMethod to return a new query, for the specified language and ExecutionContext, using the specified existing query to copy from.- Specified by:
newQueryin interfaceStoreManager- Parameters:
language- The query languageec- ExecutionContextq- Existing query- Returns:
- The query
-
getValueGenerationManager
public ValueGenerationManager getValueGenerationManager()
Description copied from interface:StoreManagerAccessor for the ValueGenerationManager for generating field values.- Specified by:
getValueGenerationManagerin interfaceStoreManager- Returns:
- The ValueGenerationManager for this datastore
-
getStoreManagerKey
public String getStoreManagerKey()
Description copied from interface:StoreManagerAccessor for the key for this store manager.- Specified by:
getStoreManagerKeyin interfaceStoreManager- Returns:
- StoreManager key
-
getQueryCacheKey
public String getQueryCacheKey()
Description copied from interface:StoreManagerAccessor for the key used for representing this store manager in the query cache.- Specified by:
getQueryCacheKeyin interfaceStoreManager- Returns:
- Key for the query cache
-
getValueGenerationStrategyValue
public Object getValueGenerationStrategyValue(ExecutionContext ec, AbstractClassMetaData cmd, AbstractMemberMetaData mmd)
Description copied from interface:StoreManagerMethod to retrieve the value for a value generation strategy for a particular field or datastore-identity.- Specified by:
getValueGenerationStrategyValuein interfaceStoreManager- Parameters:
ec- execution contextcmd- AbstractClassMetaData for the classmmd- MetaData for the member when this is for a member (or null for datastore-identity)- Returns:
- The generated value
-
isValueGenerationStrategyDatastoreAttributed
public boolean isValueGenerationStrategyDatastoreAttributed(AbstractClassMetaData cmd, int absFieldNumber)
Description copied from interface:StoreManagerConvenience method to return whether the value generation strategy used by the specified class/member is generated in the datastore during a persist.- Specified by:
isValueGenerationStrategyDatastoreAttributedin interfaceStoreManager- Parameters:
cmd- Metadata for the classabsFieldNumber- number of the field (or -1 if for datastore-id)- Returns:
- if the object for the value generation strategy is attributed by the database ("identity", etc)
-
getValueGenerationStrategyForNative
public String getValueGenerationStrategyForNative(AbstractClassMetaData cmd)
Description copied from interface:StoreManagerMethod defining which value-strategy to use when the user specifies "native"/"auto" on datastore-identity.- Specified by:
getValueGenerationStrategyForNativein interfaceStoreManager- Parameters:
cmd- Class requiring the strategy- Returns:
- The value generation strategy used when "native"/"auto" is specified
-
getValueGenerationStrategyForNative
public String getValueGenerationStrategyForNative(AbstractMemberMetaData mmd)
Description copied from interface:StoreManagerMethod defining which value-strategy to use when the user specifies "native"/"auto" on a member- Specified by:
getValueGenerationStrategyForNativein interfaceStoreManager- Parameters:
mmd- Member requiring the strategy- Returns:
- The value generation strategy used when "native"/"auto" is specified
-
getSubClassesForClass
public Collection<String> getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
Description copied from interface:StoreManagerUtility to return the names of the classes that are known subclasses of the provided class. Actually uses the MetaDataManager for determining what is a subclass since the MetaData is often registered before being needed by the Store. The important difference is that this method will then register the subclass as required- Specified by:
getSubClassesForClassin interfaceStoreManager- Parameters:
className- Class for which we search for subclasses.includeDescendents- Whether to include subclasses of subclasses etcclr- The ClassLoaderResolver- Returns:
- Set of classes that are subclasses of the input class.
-
manageClassForIdentity
public String manageClassForIdentity(Object id, ClassLoaderResolver clr)
Description copied from interface:StoreManagerConvenience method to ensure that the class defined by the passed DatastoreId/SingleFieldId is managed by the store.- Specified by:
manageClassForIdentityin interfaceStoreManager- Parameters:
id- identityclr- ClassLoader resolver- Returns:
- The class name of the class associated to this identity
-
managesClass
public boolean managesClass(String className)
Description copied from interface:StoreManagerAccessor for whether the specified class is managed currently- Specified by:
managesClassin interfaceStoreManager- Parameters:
className- The name of the class- Returns:
- Whether it is managed
-
printInformation
public void printInformation(String category, PrintStream ps) throws Exception
Description copied from interface:StoreManagerMethod to output particular information owned by this datastore. Each StoreManager can support whichever categories it likes.- Specified by:
printInformationin interfaceStoreManager- Parameters:
category- Category of informationps- PrintStream- Throws:
Exception- Thrown if an error occurs in the output process
-
unmanageAllClasses
public void unmanageAllClasses(ClassLoaderResolver clr)
Description copied from interface:StoreManagerRemove all classes from the persistence model for the datastore. This empties the datastore of all datastore objects managed by us. All objects of types not managed are left untouched. In the case of RDBMS this means drop all tables for types managed by us.- Specified by:
unmanageAllClassesin interfaceStoreManager- Parameters:
clr- The ClassLoaderResolver
-
unmanageClass
public void unmanageClass(ClassLoaderResolver clr, String className, boolean removeFromDatastore)
Description copied from interface:StoreManagerMethod to remove knowledge of the specified class from this StoreManager. This can optionally also remove it from the datastore.- Specified by:
unmanageClassin interfaceStoreManager- Parameters:
clr- ClassLoader resolverclassName- Name of the classremoveFromDatastore- Whether to also remove it from the datastore (otherwise just from the StoreManager)
-
supportsQueryLanguage
public boolean supportsQueryLanguage(String language)
Description copied from interface:StoreManagerAccessor for whether this query language is supported.- Specified by:
supportsQueryLanguagein interfaceStoreManager- Parameters:
language- The language- Returns:
- Whether it is supported.
-
getNativeQueryLanguage
public String getNativeQueryLanguage()
Description copied from interface:StoreManagerAccessor for the native query language of this store.- Specified by:
getNativeQueryLanguagein interfaceStoreManager- Returns:
- The native query language (e.g "SQL")
-
supportsValueGenerationStrategy
public boolean supportsValueGenerationStrategy(String language)
Description copied from interface:StoreManagerAccessor for whether this value generation strategy is supported.- Specified by:
supportsValueGenerationStrategyin interfaceStoreManager- Parameters:
language- The value generation strategy- Returns:
- Whether it is supported.
-
getSupportedOptions
public Collection getSupportedOptions()
Description copied from interface:StoreManagerStrings representing features that are supported by this datastore. Refer to the Strings in org.datanucleus.store.StoreManager with prefix "OPTION_".- Specified by:
getSupportedOptionsin interfaceStoreManager- Returns:
- The supported options
-
getConnectionManager
public ConnectionManager getConnectionManager()
Description copied from interface:StoreManagerAccessor for the connection manager for this store manager.- Specified by:
getConnectionManagerin interfaceStoreManager- Returns:
- connection manager
-
getConnection
public ManagedConnection getConnection(ExecutionContext ec)
-
getConnection
public ManagedConnection getConnection(ExecutionContext ec, Map options)
-
getConnection
public ManagedConnection getConnection(int isolation_level)
-
getConnectionDriverName
public String getConnectionDriverName()
Description copied from interface:StoreManagerConvenience accessor for the driver name to use for the connections (where supported).- Specified by:
getConnectionDriverNamein interfaceStoreManager- Returns:
- driver name
-
getConnectionURL
public String getConnectionURL()
Description copied from interface:StoreManagerConvenience accessor for the URL for the connections.- Specified by:
getConnectionURLin interfaceStoreManager- Returns:
- connection URL
-
getConnectionUserName
public String getConnectionUserName()
Description copied from interface:StoreManagerConvenience accessor for the user name to use for the connections (where required).- Specified by:
getConnectionUserNamein interfaceStoreManager- Returns:
- user name
-
getConnectionPassword
public String getConnectionPassword()
Description copied from interface:StoreManagerConvenience accessor for the password to use for the connections (where required).- Specified by:
getConnectionPasswordin interfaceStoreManager- Returns:
- Password
-
getConnectionFactory
public Object getConnectionFactory()
Description copied from interface:StoreManagerConvenience accessor for the primary connection factory (when a factory was provided by the user).- Specified by:
getConnectionFactoryin interfaceStoreManager- Returns:
- Connection Factory (primary)
-
getConnectionFactory2
public Object getConnectionFactory2()
Description copied from interface:StoreManagerConvenience accessor for the secondary connection factory (when a factory was provided by the user).- Specified by:
getConnectionFactory2in interfaceStoreManager- Returns:
- Connection Factory (secondary)
-
getConnectionFactory2Name
public String getConnectionFactory2Name()
Description copied from interface:StoreManagerConvenience accessor for the factory (JNDI) name for the secondary connection factory (when provided by the user).- Specified by:
getConnectionFactory2Namein interfaceStoreManager- Returns:
- Connection Factory name (secondary)
-
getConnectionFactoryName
public String getConnectionFactoryName()
Description copied from interface:StoreManagerConvenience accessor for the factory (JNDI) name for the primary connection factory (when provided by the user).- Specified by:
getConnectionFactoryNamein interfaceStoreManager- Returns:
- Connection Factory name (primary)
-
getProperty
public Object getProperty(String name)
- Specified by:
getPropertyin interfaceStoreManager
-
hasProperty
public boolean hasProperty(String name)
- Specified by:
hasPropertyin interfaceStoreManager
-
getIntProperty
public int getIntProperty(String name)
- Specified by:
getIntPropertyin interfaceStoreManager
-
getBooleanProperty
public boolean getBooleanProperty(String name)
- Specified by:
getBooleanPropertyin interfaceStoreManager
-
getBooleanProperty
public boolean getBooleanProperty(String name, boolean resultIfNotSet)
- Specified by:
getBooleanPropertyin interfaceStoreManager
-
getBooleanObjectProperty
public Boolean getBooleanObjectProperty(String name)
- Specified by:
getBooleanObjectPropertyin interfaceStoreManager
-
getStringProperty
public String getStringProperty(String name)
- Specified by:
getStringPropertyin interfaceStoreManager
-
enableSchemaGeneration
public void enableSchemaGeneration()
Description copied from interface:StoreManagerConvenience method to override the specified schema generation properties and enable schema generation.- Specified by:
enableSchemaGenerationin interfaceStoreManager
-
resetSchemaGeneration
public void resetSchemaGeneration()
Description copied from interface:StoreManagerConvenience method to reset the schema generation properties to their initial creation values, effectively undoing a call to enableSchemaGeneration.- Specified by:
resetSchemaGenerationin interfaceStoreManager
-
transactionStarted
public void transactionStarted(ExecutionContext ec)
Description copied from interface:StoreManagerMethod to inform the StoreManager that a transaction has started for the specified execution context. This allows the StoreManager to initialise any objects as required.- Specified by:
transactionStartedin interfaceStoreManager- Parameters:
ec- ExecutionContext
-
transactionCommitted
public void transactionCommitted(ExecutionContext ec)
Description copied from interface:StoreManagerMethod to inform the StoreManager that a transaction has committed for the specified execution context. This allows the StoreManager to close any objects as required.- Specified by:
transactionCommittedin interfaceStoreManager- Parameters:
ec- ExecutionContext
-
transactionRolledBack
public void transactionRolledBack(ExecutionContext ec)
Description copied from interface:StoreManagerMethod to inform the StoreManager that a transaction has rolled back for the specified execution context. This allows the StoreManager to close any objects as required.- Specified by:
transactionRolledBackin interfaceStoreManager- Parameters:
ec- ExecutionContext
-
useBackedSCOWrapperForMember
public boolean useBackedSCOWrapperForMember(AbstractMemberMetaData mmd, ExecutionContext ec)
Description copied from interface:StoreManagerMethod to return whether the specified member should use a backed SCO wrapper.- Specified by:
useBackedSCOWrapperForMemberin interfaceStoreManager- Parameters:
mmd- Metadata for the memberec- ExecutionContext- Returns:
- Whether to use a back SCO wrapper (false means use a simple SCO wrapper).
-
usesBackedSCOWrappers
public boolean usesBackedSCOWrappers()
Description copied from interface:StoreManagerWhether this store manager uses backing-store based SCO wrappers.- Specified by:
usesBackedSCOWrappersin interfaceStoreManager- Returns:
- Whether this store provides backing stores for SCO wrappers.
-
getDefaultStateManagerClassName
public String getDefaultStateManagerClassName()
- Specified by:
getDefaultStateManagerClassNamein interfaceStoreManager
-
-