All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.vality.woody.api.trace.ServiceSpan Maven / Gradle / Ivy

There is a newer version: 2.0.8
Show newest version
package dev.vality.woody.api.trace;

import java.util.concurrent.atomic.AtomicInteger;

public class ServiceSpan extends ContextSpan {

    private final AtomicInteger counter;

    public ServiceSpan() {
        counter = new AtomicInteger();
    }

    protected ServiceSpan(ServiceSpan serviceSpan) {
        super(serviceSpan);
        this.counter = serviceSpan.counter;
    }

    public ServiceSpan cloneObject() {
        return new ServiceSpan(this);
    }

    public AtomicInteger getCounter() {
        return counter;
    }

    public void reset() {
        super.reset();
        counter.set(0);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy