JGroupsBARRIER

Definition

 

The BARRIER protocol can be used to suspend the delivery of messages up the protocol stack. It can be seen as a distributed counterpart to the barrier notion found in thread programming.

 

 

All messages up the stack have to go through a barrier. By default, the barrier is open.

 

When a CLOSE_BARRIER event is received, we close the barrier. This succeeds when all previous messages have completed. Thus, when the barrier is closed, we know that there are no pending messages processed.

 

When an OPEN_BARRIER event is received, we simply open the barrier again and let all messages pass in the up direction.

 

Configuration Example

 

<BARRIER max_close_time="20000"></BARRIER>

 

Configuration Parameters

 

{font:courier new

max_close_time="60000"} how long can a barrier stay closed (0 means forever)

 

See also Protocol Configuration Common Parameters.

 

NOTE: This protocol layer is used by STATE_TRANSFER and STREAMING_STATE_TRANSFER.