org.jgroups.protocols

Class VERIFY_SUSPECT

Implemented Interfaces:
Runnable

public class VERIFY_SUSPECT
extends Protocol
implements Runnable

Catches SUSPECT events traveling up the stack. Verifies that the suspected member is really dead. If yes, passes SUSPECT event up the stack, otherwise discards it. Has to be placed somewhere above the FD layer and below the GMS layer (receiver of the SUSPECT event). Note that SUSPECT events may be reordered by this protocol.

Nested Class Summary

static class
VERIFY_SUSPECT.VerifyHeader

Field Summary

Fields inherited from class org.jgroups.stack.Protocol

down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, stats, trace, up_handler, up_prot, up_queue, up_thread, up_thread_prio, warn

Method Summary

String
getName()
void
run()
Will be started when a suspect is added to the suspects hashtable.
boolean
setProperties(Properties props)
void
stop()
void
up(Event evt)

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, isTrace, isWarn, passDown, passUp, printStats, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setTrace, setUpProtocol, setWarn, start, startDownHandler, startUpHandler, statsEnabled, stop, stopInternal, up, upThreadEnabled

Method Details

getName

public String getName()
Overrides:
getName in interface Protocol

run

public void run()
Will be started when a suspect is added to the suspects hashtable. Continually iterates over the entries and removes entries whose time have elapsed. For each removed entry, a SUSPECT event is passed up the stack (because elapsed time means verification of member's liveness failed). Computes the shortest time to wait (min of all timeouts) and waits(time) msecs. Will be woken up when entry is removed (in case of successful verification of that member's liveness). Terminates when no entry remains in the hashtable.

setProperties

public boolean setProperties(Properties props)
Overrides:
setProperties in interface Protocol

stop

public void stop()
Overrides:
stop in interface Protocol

up

public void up(Event evt)
Overrides:
up in interface Protocol

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.