Package elki.database.datastore.memory
Class ArrayRecordStore.StorageAccessor<T>
- java.lang.Object
-
- elki.database.datastore.memory.ArrayRecordStore.StorageAccessor<T>
-
- Type Parameters:
T
- Object data type to access
- All Implemented Interfaces:
DataStore<T>
,WritableDataStore<T>
- Enclosing class:
- ArrayRecordStore
protected class ArrayRecordStore.StorageAccessor<T> extends java.lang.Object implements WritableDataStore<T>
Access a single record in the given data.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private int
index
Representation index.
-
Constructor Summary
Constructors Modifier Constructor Description protected
StorageAccessor(int index)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the storage (resetting it to the default value).void
delete(DBIDRef id)
Delete the contents for a particular ID and notifies the registered listeners.void
destroy()
Deallocate the storage, freeing the memory and notifies the registered listeners.T
get(DBIDRef id)
Retrieves an object from the storage.T
put(DBIDRef id, T value)
Associates the specified value with the specified id in this storage.
-
-
-
Method Detail
-
get
public T get(DBIDRef id)
Description copied from interface:DataStore
Retrieves an object from the storage.
-
put
public T put(DBIDRef id, T value)
Description copied from interface:WritableDataStore
Associates the specified value with the specified id in this storage. If the storage previously contained a value for the id, the previous value is replaced by the specified value.- Specified by:
put
in interfaceWritableDataStore<T>
- Parameters:
id
- Database ID.value
- Value to store.- Returns:
- previous value
-
destroy
public void destroy()
Description copied from interface:WritableDataStore
Deallocate the storage, freeing the memory and notifies the registered listeners.- Specified by:
destroy
in interfaceWritableDataStore<T>
-
delete
public void delete(DBIDRef id)
Description copied from interface:WritableDataStore
Delete the contents for a particular ID and notifies the registered listeners.- Specified by:
delete
in interfaceWritableDataStore<T>
- Parameters:
id
- Database ID.
-
clear
public void clear()
Description copied from interface:WritableDataStore
Clear the storage (resetting it to the default value).- Specified by:
clear
in interfaceWritableDataStore<T>
-
-