|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Registry
provides methods for storing and retrieving
ReceivePortIdentifier
s or
IbisIdentifier
s with arbitrary names.
Method Summary | |
void |
bind(java.lang.String name,
ReceivePortIdentifier port)
Binds the specified name to the specified identifier. |
void |
dead(IbisIdentifier ibis)
Notifies that an Ibis instance must be assumed to be dead. |
IbisIdentifier |
elect(java.lang.String election)
Elects a single candidate from a number of candidates calling this method with a specified election name. |
IbisIdentifier |
getElectionResult(java.lang.String election)
Gets the result of an election, without being a candidate. |
java.lang.String[] |
listNames(java.lang.String regex)
Returns an array of strings representing names that have a receiveport identifier bound to it and match the given regular expression. |
ReceivePortIdentifier[] |
listReceivePorts(IbisIdentifier ident)
Returns the list of receiveport identifiers that are registered with this registry, and have the specified ibis as their controlling ibis. |
IbisIdentifier |
lookupIbis(java.lang.String name)
Locates the IbisIdentifier
that has been bound to the specified name . |
IbisIdentifier |
lookupIbis(java.lang.String name,
long timeout)
Locates the IbisIdentifier
that has been bound to the specified name . |
ReceivePortIdentifier |
lookupReceivePort(java.lang.String name)
Locates the ReceivePortIdentifier
that has been bound to the specified name . |
ReceivePortIdentifier |
lookupReceivePort(java.lang.String name,
long timeout)
Locates the ReceivePortIdentifier
that has been bound to the specified name . |
void |
maybeDead(IbisIdentifier ibis)
Notifies that an Ibis instance is suspected to be dead. |
void |
rebind(java.lang.String name,
ReceivePortIdentifier port)
Rebinds the specified name to the specified identifier. |
void |
unbind(java.lang.String name)
Removes any binding for the specified name. |
Method Detail |
public ReceivePortIdentifier lookupReceivePort(java.lang.String name) throws java.io.IOException
ReceivePortIdentifier
that has been bound to the specified name
.
The method blocks until a receiveport with the specified name is found.
name
- name of the receiveport.
java.io.IOException
- is thrown in case of trouble.public ReceivePortIdentifier lookupReceivePort(java.lang.String name, long timeout) throws java.io.IOException
ReceivePortIdentifier
that has been bound to the specified name
.
The method blocks until a receiveport with the specified name is found,
or the timeout expires.
If timeout is 0, the method behaves as if no timeout was given.
name
- name of the receiveport.timeout
- the timeout, in milliseconds.
ConnectionTimedOutException
- is thrown when the timeout
expires.
java.io.IOException
- is thrown in case of trouble.public IbisIdentifier lookupIbis(java.lang.String name) throws java.io.IOException, java.lang.ClassNotFoundException
IbisIdentifier
that has been bound to the specified name
.
The method blocks until an Ibis with the specified
name is found.
name
- name of the ibis.
java.lang.ClassNotFoundException
- is thrown if an IbisIdentifier
is returned whose class is locally unknown.
java.io.IOException
- is thrown in case of trouble.public IbisIdentifier lookupIbis(java.lang.String name, long timeout) throws java.io.IOException, java.lang.ClassNotFoundException
IbisIdentifier
that has been bound to the specified name
.
The method blocks until an Ibis with the specified
name is found, or the timeout expires.
If timeout is 0, the method behaves as if no timeout was given.
name
- name of the ibis.timeout
- the timeout, in milliseconds.
java.lang.ClassNotFoundException
- is thrown if an IbisIdentifier
is returned whose class is locally unknown.
ConnectionTimedOutException
- is thrown when the timeout
expires.
java.io.IOException
- is thrown in case of trouble.public ReceivePortIdentifier[] listReceivePorts(IbisIdentifier ident) throws java.io.IOException, java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
- is thrown if an any receiveport
identifier is returned whose class is locally unknown.
java.io.IOException
- is thrown in case of trouble.public IbisIdentifier elect(java.lang.String election) throws java.io.IOException, java.lang.ClassNotFoundException
election
- the name of this election.
java.lang.ClassNotFoundException
- is thrown if an Ibis identifier
is returned whose class is locally unknown.
java.io.IOException
- is thrown in case of trouble.public IbisIdentifier getElectionResult(java.lang.String election) throws java.io.IOException, java.lang.ClassNotFoundException
election
- the name of this election.
java.lang.ClassNotFoundException
- is thrown if an Ibis identifier
is returned whose class is locally unknown.
java.io.IOException
- is thrown in case of trouble.public void bind(java.lang.String name, ReceivePortIdentifier port) throws java.io.IOException
name
- the name to which a port is being bound.port
- the receiveport identifier to which a binding is made.
BindingException
- is thrown when the specified name
is already bound.
java.io.IOException
- is thrown in case of trouble.public void rebind(java.lang.String name, ReceivePortIdentifier port) throws java.io.IOException
name
- the name to which a port is being bound.port
- the receiveport identifier to which a binding is made.
java.io.IOException
- is thrown in case of trouble.public void unbind(java.lang.String name) throws java.io.IOException
name
- the name for which any binding is to be removed.
BindingException
- is thrown when the specified name was not
bound
java.io.IOException
- is thrown in case of trouble.public java.lang.String[] listNames(java.lang.String regex) throws java.io.IOException
regex
- the regular expression to match with.
java.io.IOException
- is thrown in case of trouble.public void maybeDead(IbisIdentifier ibis) throws java.io.IOException
ibis
- the Ibis identifier of the Ibis instance suspected
to be dead.
java.io.IOException
- is thrown in case of trouble.public void dead(IbisIdentifier ibis) throws java.io.IOException
ibis
- the Ibis identifier of the Ibis instance that must
be assumed to be dead.
java.io.IOException
- is thrown in case of trouble.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |