|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcsp.net2.bns.BNS
public class BNS
This is the main process for the Barrier Name Server. For a more in depth discussion of name servers, see CNS.
CNS,
BNSService,
Node| Method Summary | |
|---|---|
static BNS |
getInstance()
Gets the singleton instance of the BNS |
static void |
initialise(NodeAddress bnsNode)
Initialises the connection to the BNS |
static void |
initialise(NodeID bnsNode)
Initialises the connection to the BNS |
static NetBarrier |
netBarrier(String name,
int enrolled)
Creates a new client end of a NetBarrier |
static NetBarrier |
netBarrier(String name,
int localEnrolled,
int netEnrolled)
Creates a new server end of a NetBarrier with the given name |
static NetBarrier |
numberedNetBarrier(String name,
int index,
int localEnrolled,
int netEnrolled)
Creates a new server end of a NetBarrier with a given index and name |
void |
run()
The run method for the BNS process |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BNS getInstance()
public static void initialise(NodeID bnsNode)
throws JCSPNetworkException
bnsNode - The NodeID of the BNS Node
JCSPNetworkException - Thrown if something goes wrong in the underlying architecture
public static void initialise(NodeAddress bnsNode)
throws JCSPNetworkException
bnsNode - The NodeAddress of the BNS Node
JCSPNetworkException - Thrown if something goes wrong in the underlying architecturepublic void run()
run in interface CSProcess
public static NetBarrier netBarrier(String name,
int localEnrolled,
int netEnrolled)
throws IllegalArgumentException,
IllegalStateException
name - The name to register with the BNSlocalEnrolled - The number of locally enrolled processesnetEnrolled - The number of net enrolled processes to expect
IllegalArgumentException - Thrown if the parameters are outside the defined ranges
IllegalStateException - Thrown if the BNS connection has not been initialised
public static NetBarrier numberedNetBarrier(String name,
int index,
int localEnrolled,
int netEnrolled)
throws IllegalArgumentException,
IllegalStateException
name - Name to register with the BNSindex - The index to create the NetBarrier withlocalEnrolled - The number of locally enrolled processesnetEnrolled - The number of remote enrollments to wait for
IllegalArgumentException - Thrown if the parameters are outside the defined ranges
IllegalStateException - Thrown if the connection to the BNS has not been initialised
public static NetBarrier netBarrier(String name,
int enrolled)
throws IllegalArgumentException,
IllegalStateException,
JCSPNetworkException
name - The name to resolve with the BNSenrolled - The number of locally enrolled processes
JCSPNetworkException - Thrown if something goes wrong in the underlying architecture
IllegalArgumentException - Thrown if the number of of local enrolled is outside the defined range
IllegalStateException - Thrown if the connection to the BNS has not been initialised
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||