@Description(value="Database using an in-memory hashtable and at least providing linear scans.") public class StaticArrayDatabase extends AbstractDatabase implements Parameterizable
Modifier and Type | Class and Description |
---|---|
static class |
StaticArrayDatabase.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected DatabaseConnection |
databaseConnection
The data source we get the initial data from.
|
private DBIDView |
idrep
The DBID representation we use
|
private ArrayDBIDs |
ids
IDs of this database
|
private static Logging |
LOG
Our logger
|
eventManager, INDEX_ID, indexes, indexFactories, relations
Constructor and Description |
---|
StaticArrayDatabase()
Constructor with no indexes.
|
StaticArrayDatabase(DatabaseConnection databaseConnection,
Collection<IndexFactory<?,?>> indexFactories)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(Index index)
Add a new index to the database.
|
private Relation<?> |
addNewRelation(SimpleTypeInformation<?> meta)
Add a new representation for the given meta.
|
protected Relation<?>[] |
alignColumns(ObjectBundle pack)
Find a mapping from package columns to database columns, eventually adding
new database columns when needed.
|
protected int |
findDBIDColumn(ObjectBundle pack)
Find an DBID column.
|
protected Logging |
getLogger() |
void |
initialize()
Initialize the database by getting the initial data from the database
connection.
|
accumulateDataStoreEvents, addDataStoreListener, flushDataStoreEvents, getBundle, getDistanceQuery, getIndexes, getKNNQuery, getLongName, getRangeQuery, getRelation, getRelations, getRKNNQuery, getShortName, getSimilarityQuery, removeDataStoreListener, removeIndex
addChildResult, getHierarchy, setHierarchy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHierarchy, setHierarchy
private static final Logging LOG
private ArrayDBIDs ids
private DBIDView idrep
protected DatabaseConnection databaseConnection
public StaticArrayDatabase(DatabaseConnection databaseConnection, Collection<IndexFactory<?,?>> indexFactories)
databaseConnection
- Database connection to get the initial data from.indexFactories
- Indexes to addpublic StaticArrayDatabase()
public void initialize()
initialize
in interface Database
public void addIndex(Index index)
Database
addIndex
in interface Database
addIndex
in class AbstractDatabase
index
- Index to addprotected int findDBIDColumn(ObjectBundle pack)
pack
- Package to processprotected Relation<?>[] alignColumns(ObjectBundle pack)
pack
- Package to processprivate Relation<?> addNewRelation(SimpleTypeInformation<?> meta)
meta
- meta dataprotected Logging getLogger()
getLogger
in class AbstractDatabase