org.jgroups.protocols

Class PERF_TP


public class PERF_TP
extends Protocol

Measures the time for a message to travel from the channel to the transport

Version:
$Id: PERF_TP.java,v 1.6 2004/07/23 02:28:01 belaban Exp $

Author:
Bela Ban

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, up_handler, up_prot, up_queue, up_thread, up_thread_prio

Constructor Summary

PERF_TP()

Method Summary

boolean
done()
void
down(Event evt)
Caller by the layer above this layer.
static PERF_TP
getInstance()
String
getName()
long
getNumMessages()
long
getTotalTime()
void
init()
Called after instance has been created (null constructor) and before protocol is started.
void
reset()
void
setExpectedMessages(long m)
void
start()
This method is called on a Channel.connect(String).
String
toString()

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, passDown, passUp, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setUpProtocol, start, startDownHandler, startUpHandler, stop, stopInternal, up

Constructor Details

PERF_TP

public PERF_TP()

Method Details

done

public boolean done()


down

public void down(Event evt)
Caller by the layer above this layer. Usually we just put this Message into the send queue and let one or more worker threads handle it. A worker thread then removes the Message from the send queue, performs a conversion and adds the modified Message to the send queue of the layer below it, by calling Down).
Overrides:
down in interface Protocol


getInstance

public static PERF_TP getInstance()


getName

public String getName()
Overrides:
getName in interface Protocol


getNumMessages

public long getNumMessages()


getTotalTime

public long getTotalTime()


init

public void init()
            throws Exception
Called after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent.
Overrides:
init in interface Protocol


reset

public void reset()


setExpectedMessages

public void setExpectedMessages(long m)


start

public void start()
            throws Exception
This method is called on a Channel.connect(String). Starts work. Protocols are connected and queues are ready to receive events. Will be called from bottom to top. This call will replace the START and START_OK events.
Overrides:
start in interface Protocol


toString

public String toString()


Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.