Package elki.database.datastore
Interface DataStoreFactory
-
- All Known Implementing Classes:
MemoryDataStoreFactory
public interface DataStoreFactoryAPI for a storage factory used for producing larger storage maps. UseFACTORYfor a static instance.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static DataStoreFactoryFACTORYStatic storage factorystatic intHINT_DBData that is the main database.static intHINT_HOT"Hot" data, that will be used a lot, preferring memory storage.static intHINT_SORTEDData that might require sorted access (so hashmaps are suboptimal)static intHINT_STATIC"static" data, that will not change oftenstatic intHINT_TEMPStorage will be used only temporary.
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Field Detail
-
FACTORY
static final DataStoreFactory FACTORY
Static storage factory
-
HINT_TEMP
static final int HINT_TEMP
Storage will be used only temporary.- See Also:
- Constant Field Values
-
HINT_HOT
static final int HINT_HOT
"Hot" data, that will be used a lot, preferring memory storage.- See Also:
- Constant Field Values
-
HINT_STATIC
static final int HINT_STATIC
"static" data, that will not change often- See Also:
- Constant Field Values
-
HINT_SORTED
static final int HINT_SORTED
Data that might require sorted access (so hashmaps are suboptimal)- See Also:
- Constant Field Values
-
HINT_DB
static final int HINT_DB
Data that is the main database. Includes HOT, STATIC, SORTED- See Also:
- Constant Field Values
-
-
Method Detail
-
makeStorage
<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.- 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
WritableDBIDDataStore makeDBIDStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids- DBIDs to store data forhints- Hints for the storage manager- Returns:
- new data store
-
makeDoubleStorage
WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids- DBIDs to store data forhints- Hints for the storage manager- Returns:
- new data store
-
makeDoubleStorage
WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints, double def)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdef- Default value- Returns:
- new data store
-
makeIntegerStorage
WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids- DBIDs to store data forhints- Hints for the storage manager- Returns:
- new data store
-
makeIntegerStorage
WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints, int def)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdef- Default value- Returns:
- new data store
-
makeRecordStorage
WritableRecordStore makeRecordStorage(DBIDs ids, int hints, java.lang.Class<?>... dataclasses)
Make a new record storage, to associate the given ids with an object of class dataclass.- Parameters:
ids- DBIDs to store data forhints- Hints for the storage managerdataclasses- classes to store- Returns:
- new record store
-
-