Documentation of 'com.datumbox.framework.storage.inmemory.InMemoryEngine' Java class
InMemoryEngine
com.datumbox.framework.storage.inmemory

Class InMemoryEngine

  • All Implemented Interfaces:
    StorageEngine, java.lang.AutoCloseable


    public class InMemoryEngine
    extends AbstractFileStorageEngine<InMemoryConfiguration>
    The InMemoryEngine is responsible for saving and loading data in memory, creating BigMaps and storing data. The InMemoryEngine loads all the data in memory and stores all data in serialized files.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear()
      Clears all the data stored in the storage while keeping the connection open.
      void close()
      <T extends java.util.Map>
      void
      dropBigMap(java.lang.String name, T map)
      Drops the Big Map.
      boolean existsObject(java.lang.String name)
      Checks if an object exists with the particular name.
      <K,V> java.util.Map<K,V> getBigMap(java.lang.String name, java.lang.Class<K> keyClass, java.lang.Class<V> valueClass, StorageEngine.MapType type, StorageEngine.StorageHint storageHint, boolean isConcurrent, boolean isTemporary)
      Creates or loads a Big Map collection.
      <T extends java.io.Serializable>
      T
      loadObject(java.lang.String name, java.lang.Class<T> klass)
      Loads a serializable object from the storage.
      boolean rename(java.lang.String newStorageName)
      Renames the storage.
      <T extends java.io.Serializable>
      void
      saveObject(java.lang.String name, T serializableObject)
      Stores a serializable object in the storage.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rename

        public boolean rename(java.lang.String newStorageName)
        Renames the storage. Returns true if the operation was completed and false if it was not necessary.
        Returns:
      • existsObject

        public boolean existsObject(java.lang.String name)
        Checks if an object exists with the particular name.
        Returns:
      • saveObject

        public <T extends java.io.Serializable> void saveObject(java.lang.String name,
                                                                T serializableObject)
        Stores a serializable object in the storage.
      • loadObject

        public <T extends java.io.Serializable> T loadObject(java.lang.String name,
                                                             java.lang.Class<T> klass)
                                                      throws java.util.NoSuchElementException
        Loads a serializable object from the storage.
        Returns:
        Throws:
        java.util.NoSuchElementException
      • clear

        public void clear()
        Clears all the data stored in the storage while keeping the connection open.
      • getBigMap

        public <K,V> java.util.Map<K,V> getBigMap(java.lang.String name,
                                                  java.lang.Class<K> keyClass,
                                                  java.lang.Class<V> valueClass,
                                                  StorageEngine.MapType type,
                                                  StorageEngine.StorageHint storageHint,
                                                  boolean isConcurrent,
                                                  boolean isTemporary)
        Creates or loads a Big Map collection.
        Returns:
      • dropBigMap

        public <T extends java.util.Map> void dropBigMap(java.lang.String name,
                                                         T map)
        Drops the Big Map.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.