Class MemoryDatabase

  • All Implemented Interfaces:
    Database

    public class MemoryDatabase
    extends Object
    implements Database
    Implementation of Database, that performs all operations just in memory.
    Since:
    0.1.0
    Author:
    michalt
    • Constructor Detail

      • MemoryDatabase

        public MemoryDatabase()
    • Method Detail

      • createOrOpen

        public <T> DbConcurrentMap<T> createOrOpen​(String tableName,
                                                   Class<T> clazz)
        Description copied from interface: Database
        Creates the or open table of defined tableName.
        Specified by:
        createOrOpen in interface Database
        Type Parameters:
        T - the generic type
        Parameters:
        tableName - the table name
        clazz - the clazz
        Returns:
        the db concurrent map
      • drop

        public void drop​(String tableName)
        Description copied from interface: Database
        Drops table with defined tableName.
        Specified by:
        drop in interface Database
        Parameters:
        tableName - the table name