Package net.officefloor.nosql.cosmosdb
Class CosmosAsyncEntitiesManagedObjectSource
- java.lang.Object
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<O,F>
-
- net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<None,None>
-
- net.officefloor.nosql.cosmosdb.CosmosAsyncEntitiesManagedObjectSource
-
- All Implemented Interfaces:
ManagedObject
,ManagedObjectSource<None,None>
public class CosmosAsyncEntitiesManagedObjectSource extends AbstractManagedObjectSource<None,None> implements ManagedObject
ManagedObjectSource
for theCosmosAsyncEntities
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
-
-
Constructor Summary
Constructors Constructor Description CosmosAsyncEntitiesManagedObjectSource()
Default constructor.CosmosAsyncEntitiesManagedObjectSource(java.lang.Class<?>... entityTypes)
Instantiate with entity types to load.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ManagedObject
getManagedObject()
Synchronously obtains theManagedObject
.java.lang.Object
getObject()
Obtains the object being managed.void
loadEntityTypes(SourceContext sourceContext)
Loads the entity types.protected void
loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context)
Overridden to load meta-data.protected void
loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Overridden to load specifications.reactor.core.publisher.Mono<CosmosAsyncEntities>
setupEntities(com.azure.cosmos.CosmosAsyncDatabase database)
Sets up the entities.-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init, start, stop
-
-
-
-
Constructor Detail
-
CosmosAsyncEntitiesManagedObjectSource
public CosmosAsyncEntitiesManagedObjectSource()
Default constructor.
-
CosmosAsyncEntitiesManagedObjectSource
public CosmosAsyncEntitiesManagedObjectSource(java.lang.Class<?>... entityTypes)
Instantiate with entity types to load.- Parameters:
entityTypes
- Entity types to load.
-
-
Method Detail
-
loadEntityTypes
public void loadEntityTypes(SourceContext sourceContext) throws java.lang.Exception
Loads the entity types.- Throws:
java.lang.Exception
- If fails to load the entity types.
-
setupEntities
public reactor.core.publisher.Mono<CosmosAsyncEntities> setupEntities(com.azure.cosmos.CosmosAsyncDatabase database)
Sets up the entities.- Parameters:
database
-CosmosAsyncDatabase
.- Returns:
Mono
to createCosmosAsyncEntities
.
-
loadSpecification
protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Description copied from class:AbstractAsyncManagedObjectSource
Overridden to load specifications.- Specified by:
loadSpecification
in classAbstractAsyncManagedObjectSource<None,None>
- Parameters:
context
- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context) throws java.lang.Exception
Description copied from class:AbstractAsyncManagedObjectSource
Overridden to load meta-data.- Specified by:
loadMetaData
in classAbstractAsyncManagedObjectSource<None,None>
- Parameters:
context
- Meta-data.- Throws:
java.lang.Exception
- If fails to load the meta-data.
-
getManagedObject
protected ManagedObject getManagedObject() throws java.lang.Throwable
Description copied from class:AbstractManagedObjectSource
Synchronously obtains theManagedObject
.- Specified by:
getManagedObject
in classAbstractManagedObjectSource<None,None>
- Returns:
ManagedObject
.- Throws:
java.lang.Throwable
- If fails to obtain theManagedObject
.
-
getObject
public java.lang.Object getObject() throws java.lang.Throwable
Description copied from interface:ManagedObject
Obtains the object being managed.- Specified by:
getObject
in interfaceManagedObject
- Returns:
- Object being managed.
- Throws:
java.lang.Throwable
- Indicating failed to obtain the object for use.
-
-