Search in sources :

Example 1 with TraceStateImpl

use of org.apache.cassandra.tracing.TraceStateImpl in project cassandra by apache.

the class DebuggableThreadPoolExecutorTest method withTracing.

private static void withTracing(Runnable fn) {
    TraceState state = Tracing.instance.get();
    try {
        Tracing.instance.set(new TraceStateImpl(InetAddressAndPort.getByAddress(InetAddresses.forString("127.0.0.1")), UUID.randomUUID(), Tracing.TraceType.NONE));
        fn.run();
    } finally {
        Tracing.instance.set(state);
    }
}
Also used : TraceState(org.apache.cassandra.tracing.TraceState) TraceStateImpl(org.apache.cassandra.tracing.TraceStateImpl)

Aggregations

TraceState (org.apache.cassandra.tracing.TraceState)1 TraceStateImpl (org.apache.cassandra.tracing.TraceStateImpl)1