org.jgroups.protocols.pbcast

Class STABLE

public class STABLE extends Protocol

Computes the broadcast messages that are stable; i.e., have been received by all members. Sends STABLE events up the stack when this is the case. This allows NAKACK to garbage collect messages that have been seen by all members.

Works as follows: periodically we mcast our highest seqnos (seen for each member) to the group. A stability vector, which maintains the highest seqno for each member and initially contains no data, is updated when such a message is received. The entry for a member P is computed set to min(entry[P], digest[P]). When messages from all members have been received, a stability message is mcast, which causes all members to send a STABLE event up the stack (triggering garbage collection in the NAKACK layer).

The stable task now terminates after max_num_gossips if no messages or view changes have been sent or received in the meantime. It will resume when messages are received. This effectively suspends sending superfluous STABLE messages in the face of no activity.
New: when max_bytes is exceeded (unless disabled by setting it to 0), a STABLE task will be started (unless it is already running).

Author: Bela Ban

Nested Class Summary
static classSTABLE.StableHeader
Method Summary
voiddown(Event evt)
longgetDesiredAverageGossip()
longgetMaxBytes()
StringgetName()
intgetNumberOfGossipMessages()
VectorrequiredDownServices()
voidresetStats()
voidrunMessageGarbageCollection()
voidsetDesiredAverageGossip(long gossip_interval)
voidsetMaxBytes(long max_bytes)
booleansetProperties(Properties props)
voidstart()
voidstop()
voidup(Event evt)

Method Detail

down

public void down(Event evt)

getDesiredAverageGossip

public long getDesiredAverageGossip()

getMaxBytes

public long getMaxBytes()

getName

public String getName()

getNumberOfGossipMessages

public int getNumberOfGossipMessages()

requiredDownServices

public Vector requiredDownServices()

resetStats

public void resetStats()

runMessageGarbageCollection

public void runMessageGarbageCollection()

setDesiredAverageGossip

public void setDesiredAverageGossip(long gossip_interval)

setMaxBytes

public void setMaxBytes(long max_bytes)

setProperties

public boolean setProperties(Properties props)

start

public void start()

stop

public void stop()

up

public void up(Event evt)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.