|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.common.Sequencer
This class takes an out-of-order stream of objects and reorders them using a "push" flow model. (Descibed in Lea 1997, p. 220.) Items which enter the stream out of order are cached until all preceding items have been received and processed. Each object inserted into the Sequencer must implement the Sequenced interface.
The producer (typically the Action object associated with a WebLogic Event) calls Sequencer.insert(Sequenced s) to insert new objects into the Sequencer. The consumer registers itself as a SequenceListener with the Sequencer, and the Sequencer delivers SequenceEvents that contain either the next object in the Sequence or some exceptional condition.
The Sequencer handles the two canonical error conditions:
The Sequencer also handles two canonical warning conditions:
Field Summary | |
static int |
DEFAULT_BACKFLOW_THRESHOLD
Default threshold at which back pressure on the Sequencer is applied. |
static int |
DEFAULT_INITIAL_SEQUENCE_NUMBER
Default initial sequence number is 1. |
static int |
DEFAULT_WINDOW_SIZE
Default size of the sequence window. |
Constructor Summary | |
Sequencer()
Default constructor. |
|
Sequencer(int windowSize,
int initialSequenceNumber,
int backflowThreshold)
Constructs a Sequencer with the specified window size, initial sequence number, and backflow threshold. |
Method Summary | |
void |
addSequenceListener(SequenceListener sfListener)
Adds a single SequenceListener to a Sequence. |
int |
getNextSeq()
Gets the index of the next item in a sequence. |
void |
insert(Sequenced s)
Inserts a Sequenced object into a Sequence. |
void |
trigger(Schedulable sch)
Implements the Triggerable object so that it can be part of a trigger. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int DEFAULT_WINDOW_SIZE
public static final int DEFAULT_INITIAL_SEQUENCE_NUMBER
public static final int DEFAULT_BACKFLOW_THRESHOLD
Constructor Detail |
public Sequencer()
public Sequencer(int windowSize, int initialSequenceNumber, int backflowThreshold)
windowSize
- Size of the Sequencer cacheinitialSequenceNumber
- Beginning of index into the Sequencer cachebackflowThreshold
- Point at which cache begins to fillMethod Detail |
public int getNextSeq()
public void addSequenceListener(SequenceListener sfListener)
sfListener
- SequenceListener for failure conditionspublic void insert(Sequenced s)
s
- Object that implements the Sequenced interfacepublic void trigger(Schedulable sch)
sch
- Object that implements the Schedulable interface
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |