public class YarchDatabaseInstance extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
RDB_ENGINE_NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
addStream(AbstractStream stream)
Adds a stream to the dictionary making it "official"
|
void |
close() |
void |
createTable(TableDefinition def)
add a table to the dictionary
throws exception if a table or a stream with the same name already exist
|
void |
dropTable(String tblName) |
StreamSqlResult |
execute(String query) |
StorageEngine |
getDefaultStorageEngine() |
String |
getDefaultStorageEngineName() |
String |
getName() |
String |
getRoot()
Returns the root directory for this database instance.
|
StorageEngine |
getStorageEngine(TableDefinition tbldef) |
AbstractStream |
getStream(String name) |
Collection<AbstractStream> |
getStreams() |
TableDefinition |
getTable(String name) |
Collection<TableDefinition> |
getTableDefinitions() |
String |
getYamcsInstance() |
static boolean |
instanceExistsOnDisk(String yamcsInstance) |
void |
removeStream(String name) |
boolean |
streamOrTableExists(String name) |
public static final String RDB_ENGINE_NAME
public static boolean instanceExistsOnDisk(String yamcsInstance)
public String getName()
public String getYamcsInstance()
public String getDefaultStorageEngineName()
public StorageEngine getDefaultStorageEngine()
public void createTable(TableDefinition def) throws YarchException
def - - table definitionYarchException - - thrown in case a table or a stream with the same name already exists or if there was an error in creating the tablepublic void addStream(AbstractStream stream) throws YarchException
stream - YarchExceptionpublic TableDefinition getTable(String name)
public boolean streamOrTableExists(String name)
public AbstractStream getStream(String name)
public void dropTable(String tblName) throws YarchException
YarchExceptionpublic void removeStream(String name)
public StorageEngine getStorageEngine(TableDefinition tbldef)
public Collection<AbstractStream> getStreams()
public Collection<TableDefinition> getTableDefinitions()
public String getRoot()
public StreamSqlResult execute(String query) throws StreamSqlException, ParseException
StreamSqlExceptionParseExceptionpublic void close()
Copyright © 2018 Space Applications Services. All rights reserved.