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

Quick Search    Search Deep

com.ubermq.chord.jms
Class JMSChordInfrastructure  view JMSChordInfrastructure download JMSChordInfrastructure.java

java.lang.Object
  extended bycom.ubermq.chord.AbstractChordInfrastructure
      extended bycom.ubermq.chord.jms.JMSChordInfrastructure
All Implemented Interfaces:
com.ubermq.chord.ChordInfrastructure

public class JMSChordInfrastructure
extends com.ubermq.chord.AbstractChordInfrastructure
implements com.ubermq.chord.ChordInfrastructure

The JMS chord infrastructure implementation performs a broadcast to find nodes that already exist on the network, or takes the URL of an well-known node.


Field Summary
static java.lang.String DEFAULT_BROADCAST_TOPIC
           
static int DEFAULT_REPLICATION_FACTOR
           
private  RemoteChordNode entryPoint
           
private  java.net.URI entryPointURI
           
 
Fields inherited from class com.ubermq.chord.AbstractChordInfrastructure
identifierFactory
 
Constructor Summary
private JMSChordInfrastructure(com.ubermq.chord.ChordIdentifierFactory f, RemoteChordNode remote, java.net.URI remoteURI, int replication)
          Creates a JMS chord infrastructure, specifying a well known entry point, finger table size and replication factor.
 
Method Summary
 void close()
          Closes the interface to the infrastructure and any related resources.
 com.ubermq.chord.ChordNode entryPoint()
          The local entry point node that was used to gain access to the infrastructure.
 java.net.URI getEntryPointURI()
          Returns the Service URL of the entry point used to gain access to the infrastructure.
static com.ubermq.chord.ChordInfrastructure getInfrastructure(com.ubermq.chord.ChordIdentifierFactory f, java.net.URI url)
          Creates an infrastructure object with the given well-known entry point.
 
Methods inherited from class com.ubermq.chord.AbstractChordInfrastructure
findPredecessor, findSuccessor, query, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ubermq.chord.ChordInfrastructure
findPredecessor, findSuccessor, query, store
 

Field Detail

DEFAULT_BROADCAST_TOPIC

public static final java.lang.String DEFAULT_BROADCAST_TOPIC
See Also:
Constant Field Values

DEFAULT_REPLICATION_FACTOR

public static final int DEFAULT_REPLICATION_FACTOR
See Also:
Constant Field Values

entryPoint

private RemoteChordNode entryPoint

entryPointURI

private java.net.URI entryPointURI
Constructor Detail

JMSChordInfrastructure

private JMSChordInfrastructure(com.ubermq.chord.ChordIdentifierFactory f,
                               RemoteChordNode remote,
                               java.net.URI remoteURI,
                               int replication)
Creates a JMS chord infrastructure, specifying a well known entry point, finger table size and replication factor.

Method Detail

getInfrastructure

public static com.ubermq.chord.ChordInfrastructure getInfrastructure(com.ubermq.chord.ChordIdentifierFactory f,
                                                                     java.net.URI url)
                                                              throws java.rmi.RemoteException
Creates an infrastructure object with the given well-known entry point. This method can potentially cache infrastructures with the same entry point for speed and to reduce memory usage.

This method determines the finger table size and replication factor from the existing node.


close

public void close()
Description copied from interface: com.ubermq.chord.ChordInfrastructure
Closes the interface to the infrastructure and any related resources.

Specified by:
close in interface com.ubermq.chord.ChordInfrastructure

entryPoint

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

Specified by:
entryPoint in interface com.ubermq.chord.ChordInfrastructure

getEntryPointURI

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

Specified by:
getEntryPointURI in interface com.ubermq.chord.ChordInfrastructure