|
||||||||||
| 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.DistributedXMLStore
public class DistributedXMLStore
A peer-to-peer XMLStore that uses Kademlia as routing module.
It only operates on location independent ValueReferences. If an
XMLStore that does not operate on ValueReferences is
used as the underlying XMLStore (e.g. LocalXMLStore), it must
be wrapped in a TranslatorXMLStore.
| Field Summary |
|---|
| Fields inherited from class org.planx.xmlstore.stores.AbstractXMLStore |
|---|
xmlstore |
| Constructor Summary | |
|---|---|
DistributedXMLStore(XMLStore xmlstore,
int udpPort,
int tcpPort,
InetSocketAddress bootstrap)
Creates a DistributedXMLStore which listens for routing requests on the specified UDP port and listens for data transfer requests on the specified TCP port. |
|
| Method Summary | |
|---|---|
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 GlobalNameServer that uses the same DistributedMap
as this DistributedXMLStore. |
protected Node |
resolvedLoad(Reference vref)
If the Reference is not known in the underlying
XMLStore it is looked up in the network and loaded from
another peer if it exists. |
Reference |
save(Node node)
Always saves locally even if the node might already be stored elsewhere in the network. |
| Methods inherited from class org.planx.xmlstore.stores.AbstractXMLStore |
|---|
checkClosed, load, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DistributedXMLStore(XMLStore xmlstore,
int udpPort,
int tcpPort,
InetSocketAddress bootstrap)
throws IOException
null the XML Store will not attempt to connect to an existing
network. The DistributedXMLStore only saves locally.
xmlstore - The underlying XMLStore.udpPort - UDP port on which to listen for routing requeststcpPort - TCP port on which to listen for data transfer requestsbootstrap - IP and UDP port of an existing peer in the network
IOException| Method Detail |
|---|
public NameServer getNameServer()
GlobalNameServer that uses the same DistributedMap
as this DistributedXMLStore.
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 store
public Reference save(Node node)
throws IOException
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
Reference is not known in the underlying
XMLStore it is looked up in the network and loaded from
another peer if it exists. If the Reference could
not be found an UnknownReferenceException is thrown.
resolvedLoad in class AbstractXMLStorevref - the resolved Reference
IOException
UnknownReferenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||