Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.ubermq.chord
Interface ChordInfrastructure  view ChordInfrastructure download ChordInfrastructure.java

All Known Implementing Classes:
AbstractChordInfrastructure

public interface ChordInfrastructure


Method Summary
 void close()
          Closes the interface to the infrastructure and any related resources.
 ChordNode entryPoint()
          The local entry point node that was used to gain access to the infrastructure.
 ChordNode findPredecessor(ChordIdentifier id)
          Returns the node that precedes the specified identifier on the identifier circle.
 ChordNode findSuccessor(ChordIdentifier id)
          Returns the node that follows the specified identifier on the identifier circle.
 java.net.URI getEntryPointURI()
          Returns the Service URL of the entry point used to gain access to the infrastructure.
 java.lang.Object query(java.lang.Object key)
          Queries the infrastructure for the value associated with a key.
 void store(java.lang.Object key, java.lang.Object value)
          Stores the given value at the specified key, somewhere in the chord infrastructure.
 

Method Detail

query

public java.lang.Object query(java.lang.Object key)
                       throws java.rmi.RemoteException
Queries the infrastructure for the value associated with a key. Since a query operation is computationally and network intensive, it is assumed that nodes have some expectation that the given key resides somewhere in the infrastructure.

If the key does not have a value associated with it, or a value cannot be determined, null is returned.


store

public void store(java.lang.Object key,
                  java.lang.Object value)
           throws java.rmi.RemoteException
Stores the given value at the specified key, somewhere in the chord infrastructure. In the absence of concurrent modification, it is true that:

given i.store(key, v), then v == i.query(key);

By design, clients should not need to be aware of physically where the information associated with the key is stored.


close

public void close()
Closes the interface to the infrastructure and any related resources.


entryPoint

public ChordNode entryPoint()
The local entry point node that was used to gain access to the infrastructure.


getEntryPointURI

public java.net.URI getEntryPointURI()
Returns the Service URL of the entry point used to gain access to the infrastructure.


findSuccessor

public ChordNode findSuccessor(ChordIdentifier id)
Returns the node that follows the specified identifier on the identifier circle. This node is known as the successor, and is in charge of storing keys for the given identifier.


findPredecessor

public ChordNode findPredecessor(ChordIdentifier id)
Returns the node that precedes the specified identifier on the identifier circle.