org.jgroups.protocols
Class BW_CALC

java.lang.Object
  extended by org.jgroups.stack.Protocol
      extended by org.jgroups.protocols.BW_CALC

public class BW_CALC
extends org.jgroups.stack.Protocol

Bandwidth Calculator protocol. It passes the information periodically, depending on the configured parameter info_millis

Author:
Marc Espelt

Nested Class Summary
(package private)  class BW_CALC.UpdateTask
          The class in charge to update the values gathered during the "info_millis" period
 
Field Summary
protected static java.lang.String name
          The protocol name
 
Fields inherited from class org.jgroups.stack.Protocol
down_prot, log, props, stack, stats, up_prot
 
Constructor Summary
BW_CALC()
           
 
Method Summary
 java.lang.Object down(org.jgroups.Event evt)
           
 java.util.Map<java.lang.String,java.lang.Object> dumpStats()
           
 long getInfoMillis()
           
 java.lang.String getName()
           
 void resetStats()
           
 void setInfoMillis(long im)
           
 boolean setProperties(java.util.Properties props)
           
 void start()
           
 void stop()
           
 java.lang.Object up(org.jgroups.Event evt)
           
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, downThreadEnabled, enableStats, getDownProtocol, getProperties, getUpProtocol, init, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, setDownProtocol, setPropertiesInternal, setProtocolStack, setUpProtocol, statsEnabled, upThreadEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected static final java.lang.String name
The protocol name

See Also:
Constant Field Values
Constructor Detail

BW_CALC

public BW_CALC()
Method Detail

down

public java.lang.Object down(org.jgroups.Event evt)
Overrides:
down in class org.jgroups.stack.Protocol

dumpStats

public java.util.Map<java.lang.String,java.lang.Object> dumpStats()
Overrides:
dumpStats in class org.jgroups.stack.Protocol

getName

public final java.lang.String getName()
Specified by:
getName in class org.jgroups.stack.Protocol

resetStats

public void resetStats()
Overrides:
resetStats in class org.jgroups.stack.Protocol

setProperties

public boolean setProperties(java.util.Properties props)
Overrides:
setProperties in class org.jgroups.stack.Protocol

start

public void start()
           throws java.lang.Exception
Overrides:
start in class org.jgroups.stack.Protocol
Throws:
java.lang.Exception

stop

public void stop()
Overrides:
stop in class org.jgroups.stack.Protocol

up

public java.lang.Object up(org.jgroups.Event evt)
Overrides:
up in class org.jgroups.stack.Protocol

getInfoMillis

public long getInfoMillis()

setInfoMillis

public void setInfoMillis(long im)