|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibis.util.Sequencer
The Sequencer
class provides a global numbering.
This can be used, for instance, for global ordering of messages.
A sender must then first obtain a sequence number from the sequencer,
and tag the message with it. The receiver must then handle the messages
in the "tag" order.
A Sequencer associates a numbering scheme with a name, so the user can associate different sequences with different names.
A Sequencer is obtained by means of the getSequencer(ibis.ipl.Ibis)
method.
A sequence number is obtained from a sequencer seq
by
the seq.getSeqno(name)
call.
Field Summary | |
static int |
START_SEQNO
The first sequence number that gets given out. |
Method Summary | |
int |
getSeqno(java.lang.String name)
Returns the next sequence number associated with the specified name. |
static Sequencer |
getSequencer(Ibis ibis)
Returns a sequencer for the specified Ibis instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int START_SEQNO
Method Detail |
public static Sequencer getSequencer(Ibis ibis) throws java.io.IOException
ibis
- the Ibis instance for which a sequencer must be obtained
java.io.IOException
- gets thrown in case of troublepublic int getSeqno(java.lang.String name) throws java.io.IOException
name
- the name of the sequence.
java.io.IOException
- gets thrown in case of trouble
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |