org.planx.xmlstore.stores
Class OptimisticWriteXMLStore

java.lang.Object
  extended by org.planx.xmlstore.stores.AbstractXMLStore
      extended by org.planx.xmlstore.stores.OptimisticWriteXMLStore
All Implemented Interfaces:
XMLStore

public class OptimisticWriteXMLStore
extends AbstractXMLStore

Optimistically writes without blocking returning a proxy Reference that is resolved when the save process is completed. If the Reference is used before that, the thread will block until the reference is resolved.

Author:
Kasper Bøgebjerg, Henning Niss, Thomas Ambus

Field Summary
 
Fields inherited from class org.planx.xmlstore.stores.AbstractXMLStore
xmlstore
 
Constructor Summary
OptimisticWriteXMLStore(XMLStore xmlstore)
           
 
Method Summary
 Reference save(Node n)
          Saves the XML data represented by the specified Node.
 
Methods inherited from class org.planx.xmlstore.stores.AbstractXMLStore
checkClosed, close, load, resolvedLoad, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OptimisticWriteXMLStore

public OptimisticWriteXMLStore(XMLStore xmlstore)
Method Detail

save

public Reference save(Node n)
Description copied from interface: XMLStore
Saves the XML data represented by the specified Node. The method returns a unique location independent reference, which can be used to load the node, when needed.

Specified by:
save in interface XMLStore
Overrides:
save in class AbstractXMLStore
Parameters:
n - representing XML data in the form of semi-structured tree data
Returns:
a reference to the saved node/tree


Copyright © 2010. All Rights Reserved.