public class Database extends Object implements Journaled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyAndJournal, restoreFromCheckpoint, writeToCheckpoint
public static Database create(CatalogContext catalogContext, UdbContext udbContext, String type, String name, Map<String,String> configMap)
catalogContext
- the catalog contextudbContext
- the db contexttype
- the database typename
- the database nameconfigMap
- the configurationpublic CatalogContext getContext()
public String getName()
public DatabaseInfo getDatabaseInfo()
public String getType()
public UnderDatabase getUdb()
UnderDatabase
public Table getTable(String tableName) throws NotFoundException
tableName
- the table nameTable
for the specified table nameNotFoundException
public Table createTable(String tableName, Schema schema)
tableName
- the new table nameschema
- the schema for the tableTable
for the newly created tablepublic Map<String,FileStatistics> getStatistics(String tableName)
tableName
- the table namepublic void addTable(String tableName, Table table)
tableName
- table nametable
- table objectpublic boolean sync(JournalContext context) throws IOException
context
- journal contextIOException
public boolean processJournalEntry(Journal.JournalEntry entry)
Journaled
processJournalEntry
in interface Journaled
entry
- the entry to applypublic void resetState()
Journaled
resetState
in interface Journaled
public Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriespublic CheckpointName getCheckpointName()
getCheckpointName
in interface Checkpointed
public static Table.UpdateDatabaseInfoEntry toJournalProto(DatabaseInfo dbInfo, String dbName)
dbInfo
- database info objectdbName
- database nameCopyright © 2023. All Rights Reserved.