org.apache.avro.ipc.stats
Class StatsPlugin

java.lang.Object
  extended by org.apache.avro.ipc.RPCPlugin
      extended by org.apache.avro.ipc.stats.StatsPlugin

public class StatsPlugin
extends RPCPlugin

Collects count and latency statistics about RPC calls. Keeps data for every method. Can be added to a Requestor (client) or Responder (server). This uses milliseconds as the standard unit of measure throughout the class, stored in floats.


Field Summary
 Date startupTime
          How long I've been alive
 
Constructor Summary
StatsPlugin()
          Construct a plugin with default (system) ticks, and default histogram segmentation.
 
Method Summary
 void clientReceiveResponse(RPCContext context)
          This method is invoked at the client after the call is executed, and after the client receives the response
 void clientSendRequest(RPCContext context)
          This method is invoked at the client before it issues the RPC call.
 void serverReceiveRequest(RPCContext context)
          This method is invoked at the RPC server when the request is received, but before the call itself is executed
 void serverSendResponse(RPCContext context)
          This method is invoked at the server before the response is executed, but before the response has been formulated
 
Methods inherited from class org.apache.avro.ipc.RPCPlugin
clientFinishConnect, clientStartConnect, serverConnecting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startupTime

public Date startupTime
How long I've been alive

Constructor Detail

StatsPlugin

public StatsPlugin()
Construct a plugin with default (system) ticks, and default histogram segmentation.

Method Detail

serverReceiveRequest

public void serverReceiveRequest(RPCContext context)
Description copied from class: RPCPlugin
This method is invoked at the RPC server when the request is received, but before the call itself is executed

Overrides:
serverReceiveRequest in class RPCPlugin
Parameters:
context - the per-call rpc context (in/out parameter)

serverSendResponse

public void serverSendResponse(RPCContext context)
Description copied from class: RPCPlugin
This method is invoked at the server before the response is executed, but before the response has been formulated

Overrides:
serverSendResponse in class RPCPlugin
Parameters:
context - the per-call rpc context (in/out parameter)

clientSendRequest

public void clientSendRequest(RPCContext context)
Description copied from class: RPCPlugin
This method is invoked at the client before it issues the RPC call.

Overrides:
clientSendRequest in class RPCPlugin
Parameters:
context - the per-call rpc context (in/out parameter)

clientReceiveResponse

public void clientReceiveResponse(RPCContext context)
Description copied from class: RPCPlugin
This method is invoked at the client after the call is executed, and after the client receives the response

Overrides:
clientReceiveResponse in class RPCPlugin
Parameters:
context - the per-call rpc context


Copyright © 2010 The Apache Software Foundation