public interface Database extends HierarchicalResult
Modifier and Type | Method and Description |
---|---|
void |
accumulateDataStoreEvents()
Collects all insertion, deletion and update events until
flushDataStoreEvents() is called. |
void |
addDataStoreListener(DataStoreListener l)
Adds a listener for the
DataStoreEvent posted after the
content of the database changes. |
void |
addIndex(Index index)
Add a new index to the database.
|
void |
flushDataStoreEvents()
Fires all collected insertion, deletion and update events as one
DataStoreEvent, i.e. notifies all registered DataStoreListener how the
content of the database has been changed since
accumulateDataStoreEvents() has been called. |
SingleObjectBundle |
getBundle(DBIDRef id)
Returns the DatabaseObject represented by the specified id.
|
<O,D extends Distance<D>> |
getDistanceQuery(Relation<O> relation,
DistanceFunction<? super O,D> distanceFunction,
Object... hints)
Get the distance query for a particular distance function.
|
Collection<Index> |
getIndexes()
Collection of known indexes
|
<O,D extends Distance<D>> |
getKNNQuery(DistanceQuery<O,D> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query.
|
<O,D extends Distance<D>> |
getRangeQuery(DistanceQuery<O,D> distanceQuery,
Object... hints)
Get a range query object for the given distance query.
|
<O> Relation<O> |
getRelation(TypeInformation restriction,
Object... hints)
Get an object representation.
|
Collection<Relation<?>> |
getRelations()
Get all relations of a database.
|
<O,D extends Distance<D>> |
getRKNNQuery(DistanceQuery<O,D> distanceQuery,
Object... hints)
Get a rKNN query object for the given distance query.
|
<O,D extends Distance<D>> |
getSimilarityQuery(Relation<O> relation,
SimilarityFunction<? super O,D> similarityFunction,
Object... hints)
Get the similarity query for a particular similarity function.
|
void |
initialize()
Initialize the database, for example by loading the input data.
|
void |
removeDataStoreListener(DataStoreListener l)
Removes a listener previously added with
addDataStoreListener(DataStoreListener) . |
void |
removeIndex(Index index)
Remove a particular index
|
getHierarchy, setHierarchy
getLongName, getShortName
void initialize()
Collection<Relation<?>> getRelations()
<O> Relation<O> getRelation(TypeInformation restriction, Object... hints) throws NoSupportedDataTypeException
O
- Object typerestriction
- Type restrictionhints
- Optimizer hintsNoSupportedDataTypeException
<O,D extends Distance<D>> DistanceQuery<O,D> getDistanceQuery(Relation<O> relation, DistanceFunction<? super O,D> distanceFunction, Object... hints)
O
- Object typeD
- Distance result typerelation
- Relation useddistanceFunction
- Distance function to usehints
- Optimizer hints<O,D extends Distance<D>> SimilarityQuery<O,D> getSimilarityQuery(Relation<O> relation, SimilarityFunction<? super O,D> similarityFunction, Object... hints)
O
- Object typeD
- Similarity result typerelation
- Relation usedsimilarityFunction
- Similarity function to usehints
- Optimizer hints<O,D extends Distance<D>> KNNQuery<O,D> getKNNQuery(DistanceQuery<O,D> distanceQuery, Object... hints)
DatabaseQuery.HINT_BULK
bulk
query neededO
- Object typeD
- Distance typedistanceQuery
- Distance queryhints
- Optimizer hints<O,D extends Distance<D>> RangeQuery<O,D> getRangeQuery(DistanceQuery<O,D> distanceQuery, Object... hints)
DatabaseQuery.HINT_BULK
bulk
query neededO
- Object typeD
- Distance typedistanceQuery
- Distance queryhints
- Optimizer hints<O,D extends Distance<D>> RKNNQuery<O,D> getRKNNQuery(DistanceQuery<O,D> distanceQuery, Object... hints)
DatabaseQuery.HINT_BULK
bulk
query neededO
- Object typeD
- Distance typedistanceQuery
- Distance queryhints
- Optimizer hintsSingleObjectBundle getBundle(DBIDRef id)
id
- the id of the Object to be obtained from the Databasevoid addIndex(Index index)
index
- Index to addCollection<Index> getIndexes()
void removeIndex(Index index)
index
- Index to removevoid addDataStoreListener(DataStoreListener l)
DataStoreEvent
posted after the
content of the database changes.l
- the listener to addremoveDataStoreListener(DataStoreListener)
,
DataStoreListener
,
DataStoreEvent
void removeDataStoreListener(DataStoreListener l)
addDataStoreListener(DataStoreListener)
.l
- the listener to removeaddDataStoreListener(DataStoreListener)
,
DataStoreListener
,
DataStoreEvent
void accumulateDataStoreEvents()
flushDataStoreEvents()
is called.DataStoreEvent
void flushDataStoreEvents()
accumulateDataStoreEvents()
has been called.DataStoreListener
,
DataStoreEvent