Class DatabaseAdapter

java.lang.Object
com.activeviam.database.internal.DatabaseAdapter
All Implemented Interfaces:
IDatabase

public final class DatabaseAdapter extends Object implements IDatabase
Do not use this class as a shortcut to convert the internal database into a public IDatabase when you do not have access to the public database. This will prevent casting an IDatabase object to its explicit class.
Author:
ActiveViam
  • Constructor Details Link icon

  • Method Details Link icon

    • getCurrentSchema Link icon

      public IDatabaseSchema getCurrentSchema()
      Description copied from interface: IDatabase
      Returns the schema of the database.
      Specified by:
      getCurrentSchema in interface IDatabase
    • getQueryManager Link icon

      public IQueryManager 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 interface IDatabase
    • getDataStreamer Link icon

      public IDataStreamer getDataStreamer()
      Description copied from interface: IDatabase
      Returns the component responsible for managing streaming from this Database.
      Specified by:
      getDataStreamer in interface IDatabase
    • getHeads Link icon

      public Map<String,IDatabaseVersion> getHeads()
      Description copied from interface: IDatabase
      Returns the latest version of each branch.

      The keys are the names of the branches.

      Specified by:
      getHeads in interface IDatabase
    • getHead Link icon

      public IDatabaseVersion getHead(String branchName)
      Description copied from interface: IDatabase
      Gets the latest version in the given branch.
      Specified by:
      getHead in interface IDatabase
      Parameters:
      branchName - the name of a branch, null to retrieve the most recent versions across heads
    • getVersion Link icon

      public IDatabaseVersion getVersion(long epochId) throws UnknownEpochException
      Description copied from interface: IDatabase
      Retrieves the version at the given epoch if there is one available.
      Specified by:
      getVersion in interface IDatabase
      Parameters:
      epochId - the id of the epoch at which to retrieve the version
      Throws:
      UnknownEpochException - if this version is no more available