Class MemoryKVDatabase

java.lang.Object
io.permazen.kv.simple.SimpleKVDatabase
io.permazen.kv.simple.MemoryKVDatabase
All Implemented Interfaces:
KVDatabase, Serializable
Direct Known Subclasses:
XMLKVDatabase

public class MemoryKVDatabase extends SimpleKVDatabase
A simple in-memory implementation of the KVDatabase interface.

This is just a SimpleKVDatabase with a MemoryAtomicKVStore as its underlying key/value store. See SimpleKVDatabase for further details.

See Also:
  • Constructor Details

    • MemoryKVDatabase

      public MemoryKVDatabase()
      Constructor.

      Uses the default wait and hold timeouts.

    • MemoryKVDatabase

      public MemoryKVDatabase(long waitTimeout, long holdTimeout)
      Primary constructor.
      Parameters:
      waitTimeout - how long a thread will wait for a lock before throwing RetryKVTransactionException in milliseconds, or zero for unlimited
      holdTimeout - how long a thread may hold a contestested lock before throwing RetryKVTransactionException in milliseconds, or zero for unlimited
      Throws:
      IllegalArgumentException - if waitTimeout or holdTimeout is negative