default void clearTraceEntity() { ThreadLocalStorage.clear(); }
default Entity getTraceEntity() { return ThreadLocalStorage.get(); }
default void setTraceEntity(Entity entity) { ThreadLocalStorage.set(entity); }
public TraceID(long startTime) { number = new BigInteger(96, ThreadLocalStorage.getRandom()); this.startTime = startTime; }
public TraceID(long startTime) { number = new BigInteger(96, ThreadLocalStorage.getRandom()); this.startTime = startTime; }
public static String generateId() { String id = Long.toString(ThreadLocalStorage.getRandom().nextLong() >>> 1, 16); while (id.length() < 16) { id = '0' + id; } return id; }
default void clearTraceEntity() { ThreadLocalStorage.clear(); }
default Entity getTraceEntity() { return ThreadLocalStorage.get(); }
default void setTraceEntity(Entity entity) { ThreadLocalStorage.set(entity); }
public static String generateId() { String id = Long.toString(ThreadLocalStorage.getRandom().nextLong() >>> 1, 16); while (id.length() < 16) { id = '0' + id; } return id; }
/** * @deprecated use {@link #clearTraceEntity()} instead */ @Deprecated public void clearThreadLocal() { ThreadLocalStorage.clear(); }
/** * * @return the Entity object currently stored in the thread's ThreadLocalStorage * * @deprecated use {@link #getTraceEntity()} instead */ @Deprecated public Entity getThreadLocal() { return ThreadLocalStorage.get(); }
/** * Injects the provided {@code Entity} into the current thread's thread local context. * * @param entity * the {@code Segment} or {@code Subsegment} to inject into the current thread * * @deprecated use {@link #setTraceEntity(Entity entity)} instead */ @Deprecated public void injectThreadLocal(Entity entity) { ThreadLocalStorage.set(entity); }
/** * @deprecated use {@link #clearTraceEntity()} instead */ @Deprecated public void clearThreadLocal() { ThreadLocalStorage.clear(); }
/** * * @return the Entity object currently stored in the thread's ThreadLocalStorage * * @deprecated use {@link #getTraceEntity()} instead */ @Deprecated public Entity getThreadLocal() { return ThreadLocalStorage.get(); }
/** * Injects the provided {@code Entity} into the current thread's thread local context. * * @param entity * the {@code Segment} or {@code Subsegment} to inject into the current thread * * @deprecated use {@link #setTraceEntity(Entity entity)} instead */ @Deprecated public void injectThreadLocal(Entity entity) { ThreadLocalStorage.set(entity); }