org.apache.accumulo.cloudtrace.instrument.thrift
Class TraceWrap

java.lang.Object
  extended by org.apache.accumulo.cloudtrace.instrument.thrift.TraceWrap

public class TraceWrap
extends Object

To move trace data from client to server, the RPC call must be annotated to take a TInfo object as its first argument. The user can simply pass null, so long as they wrap their Client and Service objects with these functions.

 Trace.on("remoteMethod");
 Iface c = new Client();
 c = TraceWrap.client(c);
 c.remoteMethod(null, arg2, arg3);
 Trace.off();
 
The wrapper will see the annotated method and send or re-establish the trace information. Note that the result of these calls is a Proxy object that conforms to the basic interfaces, but is not your concrete instance.


Constructor Summary
TraceWrap()
           
 
Method Summary
static
<T> T
client(T instance)
           
static
<T> T
service(T instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceWrap

public TraceWrap()
Method Detail

service

public static <T> T service(T instance)

client

public static <T> T client(T instance)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.