org.jgroups.protocols

Class DISCARD


public class DISCARD
extends Protocol

Discards up or down messages based on a percentage; e.g., setting property 'up' to 0.1 causes 10% of all up messages to be discarded. Setting 'down' or 'up' to 0 causes no loss, whereas 1 discards all messages (not very useful).

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

void
down(Event evt)
Map
dumpStats()
String
getName()
All protocol names have to be unique !
void
resetStats()
boolean
setProperties(Properties props)
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

down

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

dumpStats

public Map dumpStats()
Overrides:
dumpStats in interface Protocol

getName

public String getName()
All protocol names have to be unique !
Overrides:
getName in interface Protocol

resetStats

public void resetStats()
Overrides:
resetStats in interface Protocol

setProperties

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

up

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

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