|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.stores.AbstractXMLStore
org.planx.xmlstore.stores.LocalXMLStore
public class LocalXMLStore
A local XMLStore that only operates on location dependent
References, that is, LocalLocators. Thus, it is
fast but unable to resolve ValueReferences. In order to do this,
wrap the LocalXMLStore in a TranslatorXMLStore.
A LocalXMLStore will run a Sharer in the background
that compacts redundant on-disk data and performs garbage collection.
| Field Summary |
|---|
| Fields inherited from class org.planx.xmlstore.stores.AbstractXMLStore |
|---|
xmlstore |
| Constructor Summary | |
|---|---|
LocalXMLStore(String name)
Creates a new LocalXMLStore with the specified on-disk name. |
|
LocalXMLStore(String name,
RegionConfiguration conf)
Creates a new LocalXMLStore with the specified on-disk name. |
|
| Method Summary | |
|---|---|
void |
addReferenceListener(ReferenceListener listener)
Adds the specified ReferenceListener for receiving
Reference events. |
protected void |
checkClosed()
|
void |
close()
The method is used to let the XMLStore properly commit all
data to the underlying ressource, release resources, and so
forth. |
NameServer |
getNameServer()
Returns a NameServer for this store. |
RegionManager |
getRegionManager()
Access to the RegionManager is provided merely for testing
purposes and for accessing the managers statistics. |
void |
release(Reference ref)
Informs the XMLStore that the data referenced by the
specified Reference is no longer needed. |
void |
removeReferenceListener(ReferenceListener listener)
Removes the specified ReferenceListener previously added
with addReferenceListener. |
protected Node |
resolvedLoad(Reference vref)
Only accepts LocalLocators. |
void |
retain(Reference ref)
Informs the XMLStore that the data referenced by the
specified Reference should be kept permanently. |
Reference |
save(Node node)
Saves the specified Node and returns a LocalLocator to it. |
long |
size()
Returns the disk size of this LocalXMLStore. |
String |
toString()
|
| Methods inherited from class org.planx.xmlstore.stores.AbstractXMLStore |
|---|
load |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocalXMLStore(String name)
throws IOException
LocalXMLStore with the specified on-disk name.
name - the on-disk file name to use as base for persistent data
IOException - if an error occurred initializing the XMLStore
using the specified name
public LocalXMLStore(String name,
RegionConfiguration conf)
throws IOException
LocalXMLStore with the specified on-disk name.
name - the on-disk file name to use as base for persistent data
IOException - if an error occurred initializing the XMLStore
using the specified name| Method Detail |
|---|
public Reference save(Node node)
throws IOException
Node and returns a LocalLocator to it.
save in interface XMLStoresave in class AbstractXMLStorenode - representing XML data in the form of semi-structured tree data
IOException - if an error occurs during disk, network, etc access
protected Node resolvedLoad(Reference vref)
throws IOException,
UnknownReferenceException
LocalLocators.
resolvedLoad in class AbstractXMLStorevref - the resolved Reference
IOException
UnknownReferenceExceptionpublic NameServer getNameServer()
NameServer for this store.
public RegionManager getRegionManager()
RegionManager is provided merely for testing
purposes and for accessing the managers statistics.
public void retain(Reference ref)
throws UnknownReferenceException
XMLStore that the data referenced by the
specified Reference should be kept permanently.
Implementations may assume that the Reference is one
previously obtained from this XMLStore.
When the data referenced is no longer needed the XMLStore
should be informed of this be calling release(Reference).
ref - the Reference to retain
UnknownReferenceException
public void release(Reference ref)
throws UnknownReferenceException
XMLStore that the data referenced by the
specified Reference is no longer needed. The
XMLStore should previously have been informed to retain
the data using the retain(Reference) method.
More specifically, implementations may assume that the argument of this
method, or one equal to it, has previously been an argument
to retain.
ref - the Reference to release
UnknownReferenceExceptionpublic void addReferenceListener(ReferenceListener listener)
ReferenceListener for receiving
Reference events.
listener - the listener to addpublic void removeReferenceListener(ReferenceListener listener)
ReferenceListener previously added
with addReferenceListener.
listener - the listener to remove
public long size()
throws IOException
LocalXMLStore.
IOException
public void close()
throws IOException
XMLStoreXMLStore properly commit all
data to the underlying ressource, release resources, and so
forth. Once close has been issued on an XMLStore, the store
is no longer available for handling requests. Any subsequent
request to the store will result in an exception being
thrown. An XMLStore implementation has to ensure that
this happens.
close in interface XMLStoreclose in class AbstractXMLStoreIOException - if it is not possible to properly close the storepublic String toString()
toString in class AbstractXMLStoreprotected void checkClosed()
checkClosed in class AbstractXMLStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||