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, waitMethods 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:IDirectQueryDatabaseReturns the bundled datastore.- Specified by:
getInMemoryDatastorein interfaceIDirectQueryDatabase
-
getInMemoryTransactionManager
Description copied from interface:IDirectQueryDatabaseReturns the in-memory transaction manager.- Specified by:
getInMemoryTransactionManagerin interfaceIDirectQueryDatabase
-
getCurrentSchema
Description copied from interface:IDatabaseReturns the schema of the database.- Specified by:
getCurrentSchemain interfaceIDatabase- Specified by:
getCurrentSchemain interfaceIDirectQueryDatabase
-
getQueryManager
Description copied from interface:IDatabaseReturns a component capable of compiling queries to run in the future or registering subscriptions to data.- Specified by:
getQueryManagerin interfaceIDatabase
-
getDataStreamer
Description copied from interface:IDatabaseReturns the component responsible for managing streaming from this Database.- Specified by:
getDataStreamerin interfaceIDatabase
-
getHeads
Description copied from interface:IDatabaseReturns the latest version of each branch.The keys are the names of the branches.
-
getHead
Description copied from interface:IDatabaseGets the latest version in the given branch.- Specified by:
getHeadin 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:IDatabaseRetrieves the version at the given epoch if there is one available.- Specified by:
getVersionin 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:IJmxableReturns the object compatible with ActiveViam JMX tooling. -
toString
-
getCompositeDatabase
- Specified by:
getCompositeDatabasein interfaceIInternalCompositeDatabaseProvider
-
getDb
-
getUserSchema
-- GETTER -- Returns the initially provided database schema.
-