Package com.activeviam.database.api
Interface IDatabase
- All Known Subinterfaces:
IDatastore
,IDirectQueryDatabase
,IInternalDatastore
- All Known Implementing Classes:
Database
,DatabaseAdapter
,Datastore
,NarrowedDatastore
public interface IDatabase
Definition of a component capable of providing data, at different versions in time.
- Since:
- 6.0.0
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionReturns the schema of the database.Returns the component responsible for managing streaming from this Database.Gets the latest version in the given branch.getHeads()
Returns the latest version of each branch.default IDatabaseVersion
Gets the latest version of the default (i.e.Returns a component capable of compiling queries to run in the future or registering subscriptions to data.getVersion
(long epochId) Retrieves the version at the given epoch if there is one available.
-
Method Details
-
getCurrentSchema
IDatabaseSchema getCurrentSchema()Returns the schema of the database. -
getQueryManager
IQueryManager getQueryManager()Returns a component capable of compiling queries to run in the future or registering subscriptions to data. -
getDataStreamer
IDataStreamer getDataStreamer()Returns the component responsible for managing streaming from this Database. -
getHeads
Map<String,IDatabaseVersion> getHeads()Returns the latest version of each branch.The keys are the names of the branches.
-
getHead
Gets the latest version in the given branch.- Parameters:
branchName
- the name of a branch, null to retrieve the most recent versions across heads- Throws:
UnknownBranchException
- if the branch cannot be found
-
getMasterHead
Gets the latest version of the default (i.e.IEpoch.MASTER_BRANCH_NAME
) branch.- Returns:
- the head of the default branch
- See Also:
-
getVersion
Retrieves the version at the given epoch if there is one available.- Parameters:
epochId
- the id of the epoch at which to retrieve the version- Throws:
UnknownEpochException
- if this version is no more available
-