Class MemoryDB

java.lang.Object
org.imixs.workflow.micro.MemoryDB

public class MemoryDB extends Object
In Memory DB.

The MemoryDB supports full concurrency of retrievals and updates of ItemCollection objects. The MemoryDB is based on the ConcurrentHashMap providing the same functional specification as a Hashtable, and includes versions of methods corresponding to each method of Hashtable. However, even though all operations are thread-safe, retrieval operations do not entail locking, and there is not any support for locking the entire table in a way that prevents all access. Find details in ConcurrentHashMap.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<String,org.imixs.workflow.ItemCollection>
     
    static final String
     
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor inits the database
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(org.imixs.workflow.ItemCollection data)
    Removes a data element from the database
    protected void
    Create a test database with some workItems and a simple model
    org.imixs.workflow.ItemCollection
    Loads a data element form the database
    org.imixs.workflow.ItemCollection
    save(org.imixs.workflow.ItemCollection data)
    Stores a data element in the database

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MemoryDB

      public MemoryDB()
      Constructor inits the database
  • Method Details

    • init

      protected void init()
      Create a test database with some workItems and a simple model
    • load

      public org.imixs.workflow.ItemCollection load(String id)
      Loads a data element form the database
      Parameters:
      id - - uniqueId of the ItemCollection
      Returns:
      ItemCollection
    • save

      public org.imixs.workflow.ItemCollection save(org.imixs.workflow.ItemCollection data)
      Stores a data element in the database
      Parameters:
      data - - ItemCollection
      Returns:
      return data instance.
    • delete

      public void delete(org.imixs.workflow.ItemCollection data)
      Removes a data element from the database
      Parameters:
      data - - ItemCollection