|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult
de.lmu.ifi.dbs.elki.database.AbstractDatabase
de.lmu.ifi.dbs.elki.database.HashmapDatabase
@Description(value="Database using an in-memory hashtable and at least providing linear scans.") public class HashmapDatabase

Provides a mapping for associations based on a Hashtable and functions to get the next usable ID for insertion, making IDs reusable after deletion of the entry.
| Nested Class Summary | |
|---|---|
static class |
HashmapDatabase.Parameterizer
Parameterization class. |
| Field Summary | |
|---|---|
protected DatabaseConnection |
databaseConnection
The data source we get the initial data from. |
private DBIDView |
idrep
The DBID representation we use |
private TreeSetModifiableDBIDs |
ids
IDs of this database |
private static Logging |
logger
Our logger |
| Fields inherited from class de.lmu.ifi.dbs.elki.database.AbstractDatabase |
|---|
eventManager, INDEX_ID, indexes, indexFactories, relations |
| Constructor Summary | |
|---|---|
HashmapDatabase()
Constructor with no indexes. |
|
HashmapDatabase(DatabaseConnection databaseConnection,
Collection<IndexFactory<?,?>> indexFactories)
Constructor. |
|
| Method Summary | |
|---|---|
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. |
MultipleObjectsBundle |
delete(DBIDs ids)
Removes the objects from the database (by calling doDelete(DBID)
for each object) and indexes and fires a deletion event. |
private void |
doDelete(DBID id)
Removes the object with the specified id from this database. |
StaticDBIDs |
getDBIDs()
Deprecated. |
protected Logging |
getLogger()
|
void |
initialize()
Initialize the database by getting the initial data from the database connection. |
DBIDs |
insert(ObjectBundle objpackages)
Inserts the given object(s) and their associations into the database. |
private void |
restoreID(DBID id)
Makes the given id reusable for new insertion operations. |
int |
size()
Deprecated. |
| Methods inherited from class de.lmu.ifi.dbs.elki.database.AbstractDatabase |
|---|
accumulateDataStoreEvents, addDataStoreListener, addIndex, flushDataStoreEvents, getBundle, getDistanceQuery, getIndexes, getKNNQuery, getLongName, getRangeQuery, getRelation, getRelations, getRKNNQuery, getShortName, getSimilarityQuery, removeDataStoreListener, removeIndex |
| Methods inherited from class de.lmu.ifi.dbs.elki.result.AbstractHierarchicalResult |
|---|
addChildResult, getHierarchy, setHierarchy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.database.Database |
|---|
accumulateDataStoreEvents, addDataStoreListener, addIndex, flushDataStoreEvents, getBundle, getDistanceQuery, getIndexes, getKNNQuery, getRangeQuery, getRelation, getRelations, getRKNNQuery, getSimilarityQuery, removeDataStoreListener, removeIndex |
| Methods inherited from interface de.lmu.ifi.dbs.elki.result.HierarchicalResult |
|---|
getHierarchy, setHierarchy |
| Methods inherited from interface de.lmu.ifi.dbs.elki.result.Result |
|---|
getLongName, getShortName |
| Field Detail |
|---|
private static final Logging logger
private TreeSetModifiableDBIDs ids
private final DBIDView idrep
protected DatabaseConnection databaseConnection
| Constructor Detail |
|---|
public HashmapDatabase(DatabaseConnection databaseConnection,
Collection<IndexFactory<?,?>> indexFactories)
databaseConnection - Database connection to get the initial data from.indexFactories - Indexes to addpublic HashmapDatabase()
| Method Detail |
|---|
public void initialize()
initialize in interface Databasepublic DBIDs insert(ObjectBundle objpackages)
UpdatableDatabase
insert in interface UpdatableDatabaseobjpackages - the objects to be inserted
protected Relation<?>[] alignColumns(ObjectBundle pack)
pack - Package to process
private Relation<?> addNewRelation(SimpleTypeInformation<?> meta)
meta - meta data
public MultipleObjectsBundle delete(DBIDs ids)
doDelete(DBID)
for each object) and indexes and fires a deletion event.
delete in interface UpdatableDatabaseids - the ids of the object to be removed from the database
private void doDelete(DBID id)
id - id the id of the object to be removed@Deprecated public final int size()
Database
size in interface Database@Deprecated public StaticDBIDs getDBIDs()
Database
getDBIDs in interface Databaseprivate void restoreID(DBID id)
id - the id to become reusableprotected Logging getLogger()
getLogger in class AbstractDatabase
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||