Class Database
java.lang.Object
com.activeviam.directquery.internal.Database
- All Implemented Interfaces:
IDatabase
,IDirectQueryDatabase
,IJmxable
,IInternalCompositeDatabaseProvider
public final class Database
extends Object
implements IDirectQueryDatabase, IJmxable, IInternalCompositeDatabaseProvider
The class representing the local database.
- Author:
- ActiveViam
-
Constructor Summary
ConstructorsConstructorDescriptionDatabase
(CompositeDatabase db, SchemaDescription userSchema, ISqlDatabase externalDb, IDatabaseMBeanProvider databaseJmxProvider) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the schema of the database.Returns the component responsible for managing streaming from this Database.getDb()
Gets the latest version in the given branch.getHeads()
Returns the latest version of each branch.Returns the bundled datastore.Returns the in-memory transaction manager.Returns a component capable of compiling queries to run in the future or registering subscriptions to data.-- GETTER -- Returns the initially provided database schema.getVersion
(long epochId) Retrieves the version at the given epoch if there is one available.toMBean()
Returns the object compatible with ActiveViam JMX tooling.toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.activeviam.database.api.IDatabase
getMasterHead
-
Constructor Details
-
Database
public Database(CompositeDatabase db, SchemaDescription userSchema, ISqlDatabase externalDb, @Nullable IDatabaseMBeanProvider databaseJmxProvider) Constructor.
-
-
Method Details
-
getInMemoryDatastore
Description copied from interface:IDirectQueryDatabase
Returns the bundled datastore.- Specified by:
getInMemoryDatastore
in interfaceIDirectQueryDatabase
-
getInMemoryTransactionManager
Description copied from interface:IDirectQueryDatabase
Returns the in-memory transaction manager.- Specified by:
getInMemoryTransactionManager
in interfaceIDirectQueryDatabase
-
getCurrentSchema
Description copied from interface:IDatabase
Returns the schema of the database.- Specified by:
getCurrentSchema
in interfaceIDatabase
- Specified by:
getCurrentSchema
in interfaceIDirectQueryDatabase
-
getQueryManager
Description copied from interface:IDatabase
Returns a component capable of compiling queries to run in the future or registering subscriptions to data.- Specified by:
getQueryManager
in interfaceIDatabase
-
getDataStreamer
Description copied from interface:IDatabase
Returns the component responsible for managing streaming from this Database.- Specified by:
getDataStreamer
in interfaceIDatabase
-
getHeads
Description copied from interface:IDatabase
Returns the latest version of each branch.The keys are the names of the branches.
-
getHead
Description copied from interface:IDatabase
Gets the latest version in the given branch.- Specified by:
getHead
in interfaceIDatabase
- Parameters:
branchName
- the name of a branch, null to retrieve the most recent versions across heads- Throws:
UnknownBranchException
- if the branch cannot be found
-
getVersion
Description copied from interface:IDatabase
Retrieves the version at the given epoch if there is one available.- Specified by:
getVersion
in interfaceIDatabase
- Parameters:
epochId
- the id of the epoch at which to retrieve the version- Throws:
UnknownEpochException
- if this version is no more available
-
toMBean
Description copied from interface:IJmxable
Returns the object compatible with ActiveViam JMX tooling. -
toString
-
getCompositeDatabase
- Specified by:
getCompositeDatabase
in interfaceIInternalCompositeDatabaseProvider
-
getDb
-
getUserSchema
-- GETTER -- Returns the initially provided database schema.
-