Class 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
    • Constructor Detail

      • MemoryDataStoreFactory

        public MemoryDataStoreFactory()
    • Method Detail

      • makeStorage

        public <T> WritableDataStore<T> makeStorage​(DBIDs ids,
                                                    int hints,
                                                    java.lang.Class<? super T> dataclass)
        Description copied from interface: DataStoreFactory
        Make a new storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeStorage in interface DataStoreFactory
        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

        public WritableDBIDDataStore makeDBIDStorage​(DBIDs ids,
                                                     int hints)
        Description copied from interface: DataStoreFactory
        Make a new storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeDBIDStorage in interface DataStoreFactory
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        Returns:
        new data store
      • makeDoubleStorage

        public WritableDoubleDataStore makeDoubleStorage​(DBIDs ids,
                                                         int hints)
        Description copied from interface: DataStoreFactory
        Make a new storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeDoubleStorage in interface DataStoreFactory
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        Returns:
        new data store
      • makeDoubleStorage

        public WritableDoubleDataStore makeDoubleStorage​(DBIDs ids,
                                                         int hints,
                                                         double def)
        Description copied from interface: DataStoreFactory
        Make a new storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeDoubleStorage in interface DataStoreFactory
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        def - Default value
        Returns:
        new data store
      • makeIntegerStorage

        public WritableIntegerDataStore makeIntegerStorage​(DBIDs ids,
                                                           int hints)
        Description copied from interface: DataStoreFactory
        Make a new storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeIntegerStorage in interface DataStoreFactory
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        Returns:
        new data store
      • makeIntegerStorage

        public WritableIntegerDataStore makeIntegerStorage​(DBIDs ids,
                                                           int hints,
                                                           int def)
        Description copied from interface: DataStoreFactory
        Make a new storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeIntegerStorage in interface DataStoreFactory
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        def - Default value
        Returns:
        new data store
      • makeRecordStorage

        public WritableRecordStore makeRecordStorage​(DBIDs ids,
                                                     int hints,
                                                     java.lang.Class<?>... dataclasses)
        Description copied from interface: DataStoreFactory
        Make a new record storage, to associate the given ids with an object of class dataclass.
        Specified by:
        makeRecordStorage in interface DataStoreFactory
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        dataclasses - classes to store
        Returns:
        new record store