Interface DataStoreFactory

  • All Known Implementing Classes:
    MemoryDataStoreFactory

    public interface DataStoreFactory
    API for a storage factory used for producing larger storage maps. Use FACTORY for a static instance.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Detail

      • 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 for
        hints - Hints for the storage manager
        dataclass - 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 for
        hints - 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 for
        hints - 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 for
        hints - Hints for the storage manager
        def - 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 for
        hints - 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 for
        hints - Hints for the storage manager
        def - 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 for
        hints - Hints for the storage manager
        dataclasses - classes to store
        Returns:
        new record store