Package org.imixs.workflow.micro
Class MemoryDB
java.lang.Object
org.imixs.workflow.micro.MemoryDB
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(org.imixs.workflow.ItemCollection data) Removes a data element from the databaseprotected voidinit()Create a test database with some workItems and a simple modelorg.imixs.workflow.ItemCollectionLoads a data element form the databaseorg.imixs.workflow.ItemCollectionsave(org.imixs.workflow.ItemCollection data) Stores a data element in the database
-
Field Details
-
database
-
ISAUTHOR
- See Also:
-
NOINDEX
- See Also:
-
IMMUTABLE
- See Also:
-
-
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
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
-