org.progressmining.xeslite.external.store.mapdb
Class XAttributeMapDBStore

java.lang.Object
  extended by org.progressmining.xeslite.external.store.mapdb.XAttributeMapDBStore
All Implemented Interfaces:
XAttributeStore
Direct Known Subclasses:
XAttributeMapDBStore.DirectMemoryStore, XAttributeMapDBStore.DiskStore

public abstract class XAttributeMapDBStore
extends java.lang.Object
implements XAttributeStore

Implementation using MapDB (https://github.com/jankotek/mapdb) as back-end.

Author:
F. Mannhardt

Nested Class Summary
static class XAttributeMapDBStore.DirectMemoryStore
           
static class XAttributeMapDBStore.DiskStore
           
 
Constructor Summary
protected XAttributeMapDBStore()
           
 
Method Summary
 void commit()
          Commits all pending changes to the underlying storage
protected abstract  org.mapdb.DB createDB()
           
protected  void finalize()
           
 org.deckfour.xes.model.XAttributeMap getAttributes(XExternalAttributable attributable)
           
 boolean hasAttributes(XExternalAttributable attributable)
           
 org.deckfour.xes.model.XAttributeMap removeAttributes(XExternalAttributable attributable)
           
 void setAttributes(XExternalAttributable attributable, org.deckfour.xes.model.XAttributeMap attributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAttributeMapDBStore

protected XAttributeMapDBStore()
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

createDB

protected abstract org.mapdb.DB createDB()
                                  throws java.io.IOException
Throws:
java.io.IOException

getAttributes

public final org.deckfour.xes.model.XAttributeMap getAttributes(XExternalAttributable attributable)
Specified by:
getAttributes in interface XAttributeStore
Returns:
the XAttributeMap associated with this id, possibly empty

hasAttributes

public final boolean hasAttributes(XExternalAttributable attributable)
Specified by:
hasAttributes in interface XAttributeStore

setAttributes

public final void setAttributes(XExternalAttributable attributable,
                                org.deckfour.xes.model.XAttributeMap attributes)
Specified by:
setAttributes in interface XAttributeStore
attributes - the XAttributeMap that replaces all existing attributes for this id

removeAttributes

public final org.deckfour.xes.model.XAttributeMap removeAttributes(XExternalAttributable attributable)
Specified by:
removeAttributes in interface XAttributeStore
Returns:
a XAttributeMap with the previous values, possibly empty

commit

public final void commit()
Description copied from interface: XAttributeStore
Commits all pending changes to the underlying storage

Specified by:
commit in interface XAttributeStore