Package elki.database.datastore.memory
Class MemoryDataStoreFactory
- java.lang.Object
-
- elki.database.datastore.memory.MemoryDataStoreFactory
-
- All Implemented Interfaces:
DataStoreFactory
public class MemoryDataStoreFactory extends java.lang.Object implements DataStoreFactory
Simple factory class that will store all data in memory using object arrays or hashmaps. Hints are currently not used by this implementation, since everything is in-memory.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
-
Fields inherited from interface elki.database.datastore.DataStoreFactory
FACTORY, HINT_DB, HINT_HOT, HINT_SORTED, HINT_STATIC, HINT_TEMP
-
-
Constructor Summary
Constructors Constructor Description MemoryDataStoreFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WritableDBIDDataStoremakeDBIDStorage(DBIDs ids, int hints)Make a new storage, to associate the given ids with an object of class dataclass.WritableDoubleDataStoremakeDoubleStorage(DBIDs ids, int hints)Make a new storage, to associate the given ids with an object of class dataclass.WritableDoubleDataStoremakeDoubleStorage(DBIDs ids, int hints, double def)Make a new storage, to associate the given ids with an object of class dataclass.WritableIntegerDataStoremakeIntegerStorage(DBIDs ids, int hints)Make a new storage, to associate the given ids with an object of class dataclass.WritableIntegerDataStoremakeIntegerStorage(DBIDs ids, int hints, int def)Make a new storage, to associate the given ids with an object of class dataclass.WritableRecordStoremakeRecordStorage(DBIDs ids, int hints, java.lang.Class<?>... dataclasses)Make a new record storage, to associate the given ids with an object of class dataclass.<T> WritableDataStore<T>makeStorage(DBIDs ids, int hints, java.lang.Class<? super T> dataclass)Make a new storage, to associate the given ids with an object of class dataclass.
-
-
-
Method Detail
-
makeStorage
public <T> WritableDataStore<T> makeStorage(DBIDs ids, int hints, java.lang.Class<? super T> dataclass)
Description copied from interface:DataStoreFactoryMake a new storage, to associate the given ids with an object of class dataclass.- Specified by:
makeStoragein interfaceDataStoreFactory- Type Parameters:
T- stored data type- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdataclass- class to store- Returns:
- new data store
-
makeDBIDStorage
public WritableDBIDDataStore makeDBIDStorage(DBIDs ids, int hints)
Description copied from interface:DataStoreFactoryMake a new storage, to associate the given ids with an object of class dataclass.- Specified by:
makeDBIDStoragein interfaceDataStoreFactory- Parameters:
ids- DBIDs to store data forhints- Hints for the storage manager- Returns:
- new data store
-
makeDoubleStorage
public WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints)
Description copied from interface:DataStoreFactoryMake a new storage, to associate the given ids with an object of class dataclass.- Specified by:
makeDoubleStoragein interfaceDataStoreFactory- Parameters:
ids- DBIDs to store data forhints- Hints for the storage manager- Returns:
- new data store
-
makeDoubleStorage
public WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints, double def)
Description copied from interface:DataStoreFactoryMake a new storage, to associate the given ids with an object of class dataclass.- Specified by:
makeDoubleStoragein interfaceDataStoreFactory- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdef- Default value- Returns:
- new data store
-
makeIntegerStorage
public WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints)
Description copied from interface:DataStoreFactoryMake a new storage, to associate the given ids with an object of class dataclass.- Specified by:
makeIntegerStoragein interfaceDataStoreFactory- Parameters:
ids- DBIDs to store data forhints- Hints for the storage manager- Returns:
- new data store
-
makeIntegerStorage
public WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints, int def)
Description copied from interface:DataStoreFactoryMake a new storage, to associate the given ids with an object of class dataclass.- Specified by:
makeIntegerStoragein interfaceDataStoreFactory- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdef- Default value- Returns:
- new data store
-
makeRecordStorage
public WritableRecordStore makeRecordStorage(DBIDs ids, int hints, java.lang.Class<?>... dataclasses)
Description copied from interface:DataStoreFactoryMake a new record storage, to associate the given ids with an object of class dataclass.- Specified by:
makeRecordStoragein interfaceDataStoreFactory- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdataclasses- classes to store- Returns:
- new record store
-
-