public interface PersistenceNucleusContext extends StoreNucleusContext
Modifier and Type | Method and Description |
---|---|
void |
addExecutionContextListener(ExecutionContext.LifecycleListener listener)
Register a new Listener for ExecutionContext events.
|
void |
addInternalFetchGroup(FetchGroup grp)
Method to add a dynamic FetchGroup for use by this OMF.
|
FetchGroup |
createInternalFetchGroup(Class cls,
String name)
Method to create a new internal fetch group for the class+name.
|
AutoStartMechanism |
getAutoStartMechanism() |
ExecutionContext |
getExecutionContext(Object owner,
Map<String,Object> options)
Method to return an ExecutionContext for use in persistence.
|
ExecutionContext.LifecycleListener[] |
getExecutionContextListeners()
Object the array of registered ExecutionContext listeners.
|
ExecutionContextPool |
getExecutionContextPool() |
FetchGroupManager |
getFetchGroupManager()
Convenience accessor for the FetchGroupManager.
|
Set<FetchGroup> |
getFetchGroupsWithName(String name)
Accessor for the fetch groups for the specified name.
|
IdentityManager |
getIdentityManager()
Accessor for a manager for identities.
|
ImplementationCreator |
getImplementationCreator() |
FetchGroup |
getInternalFetchGroup(Class cls,
String name,
boolean createIfNotPresent)
Accessor for an internal fetch group for the specified class.
|
ManagementManager |
getJMXManager()
Accessor for the JMX manager (if required).
|
JTASyncRegistry |
getJtaSyncRegistry() |
TransactionManager |
getJtaTransactionManager()
Accessor for the JTA transaction manager (if using JTA).
|
Level2Cache |
getLevel2Cache() |
ObjectProviderFactory |
getObjectProviderFactory() |
FactoryStatistics |
getStatistics() |
TransactionManager |
getTransactionManager() |
CallbackHandler |
getValidationHandler(ExecutionContext ec)
Method to return a handler for validation (JSR303).
|
boolean |
hasLevel2Cache() |
boolean |
isClassCacheable(AbstractClassMetaData cmd)
Convenience method to return if objects of this type are cached for this NucleusContext.
|
boolean |
isClassWithIdentityCacheable(Object id)
Convenience method to return if the supplied id is of an object that is cacheable in the L2 cache.
|
boolean |
isFederated()
Return whether we are managing a federated context (i.e a primary StoreManager, with some secondary StoreManager(s)).
|
boolean |
isJcaMode()
Accessor for the JCA mode.
|
void |
removeExecutionContextListener(ExecutionContext.LifecycleListener listener)
Unregister a Listener from ExecutionContext events.
|
void |
removeInternalFetchGroup(FetchGroup grp)
Method to remove a dynamic FetchGroup from use by this OMF.
|
void |
setJcaMode(boolean jca)
Mutator for whether we are in JCA mode.
|
boolean |
statisticsEnabled()
Accessor for whether statistics gathering is enabled.
|
getStoreManager
applyDefaultProperties, close, getApiAdapter, getApiName, getClassLoaderResolver, getConfiguration, getMetaDataManager, getPluginManager, getTypeManager, initialise, supportsORMMetaData
AutoStartMechanism getAutoStartMechanism()
ObjectProviderFactory getObjectProviderFactory()
ExecutionContextPool getExecutionContextPool()
ExecutionContext getExecutionContext(Object owner, Map<String,Object> options)
owner
- The owner object for the context. PersistenceManager/EntityManager typically.options
- Any options affecting startupIdentityManager getIdentityManager()
boolean statisticsEnabled()
ManagementManager getJMXManager()
FactoryStatistics getStatistics()
ImplementationCreator getImplementationCreator()
TransactionManager getTransactionManager()
TransactionManager getJtaTransactionManager()
JTASyncRegistry getJtaSyncRegistry()
CallbackHandler getValidationHandler(ExecutionContext ec)
ec
- The ExecutionContext that the handler is for.boolean hasLevel2Cache()
Level2Cache getLevel2Cache()
ExecutionContext.LifecycleListener[] getExecutionContextListeners()
ExecutionContext.LifecycleListener
void addExecutionContextListener(ExecutionContext.LifecycleListener listener)
listener
- the listener to registervoid removeExecutionContextListener(ExecutionContext.LifecycleListener listener)
listener
- the listener to unregistervoid setJcaMode(boolean jca)
jca
- true if using JCA connectorboolean isJcaMode()
FetchGroupManager getFetchGroupManager()
void addInternalFetchGroup(FetchGroup grp)
grp
- The groupvoid removeInternalFetchGroup(FetchGroup grp)
grp
- The groupFetchGroup createInternalFetchGroup(Class cls, String name)
cls
- Class that it applies toname
- Name of groupFetchGroup getInternalFetchGroup(Class cls, String name, boolean createIfNotPresent)
cls
- The classname
- Name of the groupcreateIfNotPresent
- Whether to create the fetch group if not presentNucleusUserException
- if the class is not persistableSet<FetchGroup> getFetchGroupsWithName(String name)
name
- Name of the groupboolean isClassWithIdentityCacheable(Object id)
id
- The identityboolean isClassCacheable(AbstractClassMetaData cmd)
cmd
- MetaData for the classboolean isFederated()
Copyright © 2017. All rights reserved.