Class ManagedObjectMetaDataImpl<O extends java.lang.Enum<O>>
- java.lang.Object
-
- net.officefloor.frame.impl.execute.managedobject.ManagedObjectMetaDataImpl<O>
-
- All Implemented Interfaces:
ManagedObjectMetaData<O>
public class ManagedObjectMetaDataImpl<O extends java.lang.Enum<O>> extends java.lang.Object implements ManagedObjectMetaData<O>
Meta-data of theManagedObject
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectMetaDataImpl(java.lang.String boundManagedObjectName, java.lang.Class<?> objectType, int instanceIndex, ManagedObjectSource<?,?> source, ManagedObjectPool pool, boolean isContextAwareManagedObject, AssetManagerReference sourcingManagerReference, boolean isManagedObjectAsynchronous, AssetManagerReference operationsManagerReference, boolean isCoordinatingManagedObject, ManagedObjectIndex[] dependencyMapping, long timeout, ManagedObjectGovernanceMetaData<?>[] governanceMetaData, java.util.logging.Logger logger)
Instantiate.
-
Method Summary
-
-
-
Constructor Detail
-
ManagedObjectMetaDataImpl
public ManagedObjectMetaDataImpl(java.lang.String boundManagedObjectName, java.lang.Class<?> objectType, int instanceIndex, ManagedObjectSource<?,?> source, ManagedObjectPool pool, boolean isContextAwareManagedObject, AssetManagerReference sourcingManagerReference, boolean isManagedObjectAsynchronous, AssetManagerReference operationsManagerReference, boolean isCoordinatingManagedObject, ManagedObjectIndex[] dependencyMapping, long timeout, ManagedObjectGovernanceMetaData<?>[] governanceMetaData, java.util.logging.Logger logger)
Instantiate.- Parameters:
boundManagedObjectName
- Name of theManagedObject
bound within theManagedObjectScope
.objectType
- Type of theObject
returned from theManagedObject
.instanceIndex
- Instance index.source
-ManagedObjectSource
of theManagedObject
.pool
-ManagedObjectPool
of theManagedObject
.isContextAwareManagedObject
-true
if theManagedObject
isContextAwareManagedObject
.sourcingManagerReference
-AssetManagerReference
to manage the sourcing of theManagedObject
instances.isManagedObjectAsynchronous
-true
if theManagedObject
isAsynchronousManagedObject
.operationsManagerReference
-AssetManagerReference
to manage the asynchronous operations on theManagedObject
instances.isCoordinatingManagedObject
-true
if theManagedObject
isCoordinatingManagedObject
.dependencyMapping
-ManagedObjectIndex
for the dependencies in the index order required.timeout
- Timeout of an asynchronous operation by theManagedObject
being managed.governanceMetaData
-ManagedObjectGovernanceMetaData
instances applicable to thisManagedObject
.logger
-Logger
for theManagedObject
.
-
-
Method Detail
-
loadRemainingState
public void loadRemainingState(OfficeMetaData officeMetaData, ManagedObjectStartupFunction[] startupFunctions, FlowMetaData recycleFlowMetaData, ManagedObjectAdministrationMetaData<?,?,?>[] preloadAdministration)
Loads the remaining state of thisManagedObjectMetaData
.- Parameters:
officeMetaData
-OfficeMetaData
of theOffice
containing thisManagedObjectMetaData
.startupFunctions
-ManagedObjectStartupFunction
instances for thisManagedObjectSource
.recycleFlowMetaData
-FlowMetaData
for the recycling of thisManagedObject
.preloadAdministration
- Pre-loadManagedObjectAdministrationMetaData
.
-
getBoundManagedObjectName
public java.lang.String getBoundManagedObjectName()
Description copied from interface:ManagedObjectMetaData
Obtains the name of theManagedObject
bound within theManagedObjectScope
.- Specified by:
getBoundManagedObjectName
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
- Name of the
ManagedObject
bound within theManagedObjectScope
.
-
getLogger
public java.util.logging.Logger getLogger()
Description copied from interface:ManagedObjectMetaData
Obtains theLogger
for theManagedObject
.- Specified by:
getLogger
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
Logger
for theManagedObject
.
-
getObjectType
public java.lang.Class<?> getObjectType()
Description copied from interface:ManagedObjectMetaData
Obtains the type of theObject
returned from theManagedObject
.- Specified by:
getObjectType
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
- Type of the
Object
returned from theManagedObject
.
-
getInstanceIndex
public int getInstanceIndex()
Description copied from interface:ManagedObjectMetaData
Obtains the instance index of the
ManagedObject
bound to theManagedObjectIndex
.ManagedObjectSource
instances that invokeProcessState
instances with the same type of Object may all be bound to the sameManagedObjectIndex
.- Specified by:
getInstanceIndex
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
- Instance index of the
ManagedObject
bound to theManagedObjectIndex
.
-
getSourcingManagerReference
public AssetManagerReference getSourcingManagerReference()
Description copied from interface:ManagedObjectMetaData
Obtains theAssetManagerReference
that manages the sourcing of theManagedObject
.- Specified by:
getSourcingManagerReference
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
AssetManagerReference
that manages the sourcing of theManagedObject
.
-
getManagedObjectSource
public ManagedObjectSource<?,?> getManagedObjectSource()
Description copied from interface:ManagedObjectMetaData
Obtains theManagedObjectSource
for theManagedObject
.- Specified by:
getManagedObjectSource
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
ManagedObjectSource
for theManagedObject
.
-
getManagedObjectPool
public ManagedObjectPool getManagedObjectPool()
Description copied from interface:ManagedObjectMetaData
Obtains theManagedObjectPool
for theManagedObject
.- Specified by:
getManagedObjectPool
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
ManagedObjectPool
for theManagedObject
.
-
getStartupFunctions
public ManagedObjectStartupFunction[] getStartupFunctions()
Description copied from interface:ManagedObjectMetaData
Obtains theManagedObjectStartupFunction
instances for theManagedObjectSource
.- Specified by:
getStartupFunctions
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
ManagedObjectStartupFunction
instances for theManagedObjectSource
.
-
getTimeout
public long getTimeout()
Description copied from interface:ManagedObjectMetaData
Obtains the time out in milliseconds for the asynchronous operation to complete.- Specified by:
getTimeout
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
- Time out in milliseconds.
-
isContextAwareManagedObject
public boolean isContextAwareManagedObject()
Description copied from interface:ManagedObjectMetaData
Indicates if theManagedObject
implementsContextAwareManagedObject
.- Specified by:
isContextAwareManagedObject
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
true
if theManagedObject
implementsContextAwareManagedObject
.
-
isManagedObjectAsynchronous
public boolean isManagedObjectAsynchronous()
Description copied from interface:ManagedObjectMetaData
Indicates if the
ManagedObject
implementsAsynchronousManagedObject
.Should the
ManagedObject
implementAsynchronousManagedObject
then it will require checking if ready.- Specified by:
isManagedObjectAsynchronous
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
true
if theManagedObject
implementsAsynchronousManagedObject
.
-
getOperationsManagerReference
public AssetManagerReference getOperationsManagerReference()
Description copied from interface:ManagedObjectMetaData
Obtains theAssetManagerReference
that manages asynchronous operations on theManagedObject
.- Specified by:
getOperationsManagerReference
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
AssetManagerReference
that manages asynchronous operations on theManagedObject
.
-
isCoordinatingManagedObject
public boolean isCoordinatingManagedObject()
Description copied from interface:ManagedObjectMetaData
Indicates if theManagedObject
implementsCoordinatingManagedObject
.- Specified by:
isCoordinatingManagedObject
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
true
if theManagedObject
implementsCoordinatingManagedObject
.
-
getFunctionLoop
public FunctionLoop getFunctionLoop()
Description copied from interface:ManagedObjectMetaData
Obtains theFunctionLoop
for theManagedObject
.- Specified by:
getFunctionLoop
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
FunctionLoop
for theManagedObject
.
-
getMonitorClock
public MonitorClock getMonitorClock()
Description copied from interface:ManagedObjectMetaData
Obtains theMonitorClock
.- Specified by:
getMonitorClock
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
MonitorClock
.
-
checkReady
public FunctionState checkReady(ManagedFunctionContainer managedFunction, ManagedObjectReadyCheck check, ManagedObjectContainer currentContainer)
Description copied from interface:ManagedObjectMetaData
Creates a
FunctionState
to check if the dependencies of thisManagedObject
are ready.Should a
ManagedObject
not be ready, then will latch theManagedFunctionContainer
to wait for theManagedObject
to be ready.- Specified by:
checkReady
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Parameters:
managedFunction
-ManagedFunctionContainer
requesting the check of theManagedObject
to be ready.check
-ManagedObjectReadyCheck
.currentContainer
- Optional able to include the currentManagedObjectContainer
for thisManagedObjectMetaData
in ready check. May benull
to not include.- Returns:
FunctionState
instances to check if the dependencies of thisManagedObject
are ready.
-
createObjectRegistry
public ObjectRegistry<O> createObjectRegistry(ManagedFunctionContainer currentContainer)
Description copied from interface:ManagedObjectMetaData
Creates theObjectRegistry
for theManagedObject
.- Specified by:
createObjectRegistry
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Parameters:
currentContainer
-ManagedFunctionContainer
.- Returns:
ObjectRegistry
.
-
getGovernanceMetaData
public ManagedObjectGovernanceMetaData<?>[] getGovernanceMetaData()
Description copied from interface:ManagedObjectMetaData
Obtains theManagedObjectGovernanceMetaData
applicable to thisManagedObject
.- Specified by:
getGovernanceMetaData
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
ManagedObjectGovernanceMetaData
applicable to thisManagedObject
.
-
getPreLoadAdministration
public ManagedObjectAdministrationMetaData<?,?,?>[] getPreLoadAdministration()
Description copied from interface:ManagedObjectMetaData
Obtains the pre-loadManagedObjectAdministrationMetaData
.- Specified by:
getPreLoadAdministration
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Returns:
- Pre-load
ManagedObjectAdministrationMetaData
.
-
recycle
public FunctionState recycle(ManagedObject managedObject, ManagedObjectCleanup cleanup)
Description copied from interface:ManagedObjectMetaData
Creates theFunctionState
for the recycling of theManagedObject
.- Specified by:
recycle
in interfaceManagedObjectMetaData<O extends java.lang.Enum<O>>
- Parameters:
managedObject
-ManagedObject
to be recycled. Obtained by theRecycleManagedObjectParameter.getManagedObject()
.cleanup
-ManagedObjectCleanup
.- Returns:
FunctionState
for the recycling thisManagedObject
ornull
if no recycling is required for thisManagedObject
.
-
-