本文整理了Java中com.github.kristofa.brave.internal.Nullable.<init>()
方法的一些代码示例,展示了Nullable.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Nullable.<init>()
方法的具体详情如下:
包路径:com.github.kristofa.brave.internal.Nullable
类名称:Nullable
方法名:<init>
暂无
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Gets the Trace/Span context.
*
* @return Trace/Span context. Can be <code>null</code> in case we did not get any context in request.
*/
@Nullable
public abstract Span getSpan();
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Indicates if we need to sample this request or not.
*
* @return <code>true</code> in case we should sample this request, <code>false</code> in case we should not sample this
* request or <code>null</code> in case we did not get any indication about sampling this request. In this case
* new client requests should decide about sampling or not.
*/
@Nullable
public abstract Boolean getSample();
代码示例来源:origin: com.github.kristofa/brave-core
/**
* Indicates if we need to sample this request or not.
*
* @return <code>true</code> in case we should sample this request, <code>false</code> in case we should not sample this
* request or <code>null</code> in case we did not get any indication about sampling this request. In this case
* new client requests should decide about sampling or not.
*/
@Nullable
public abstract Boolean getSample();
代码示例来源:origin: io.zipkin.brave/brave-core
@Nullable
@Override
Span currentLocalSpan() {
return currentLocalSpan;
}
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Gets the Span for the client request that was started as part of current request.
* <p/>
* Should be thread-aware to support multiple parallel requests.
*
* @return Client request span for current thread.
*/
@Nullable Span getCurrentClientSpan();
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Gets the Span for the local request that was started as part of current request.
* <p/>
* Should be thread-aware to support multiple parallel requests.
*
* @return Local request span for current thread.
*/
@Nullable
Span getCurrentLocalSpan();
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Returns the upstream sampling decision or null to make one here.
*
* @see SpanId#sampled()
*/
@Nullable
public abstract Boolean getSample();
代码示例来源:origin: io.zipkin.brave/brave-core
@Nullable
@Override
public Span getSpan() {
return getSpan;
}
代码示例来源:origin: com.github.kristofa/brave-core
/**
* Enrich the request with the Spanid so we pass the state to the
* service we are calling.
*
* @param spanId Nullable span id. If null we don't need to trace request and you
* should pass an indication along with the request that indicates we won't trace this request.
*/
void addSpanIdToRequest(@Nullable SpanId spanId);
代码示例来源:origin: com.github.kristofa/brave-core
/**
* Provides the remote server address information for additional tracking.
*
* Can be useful when communicating with non-traced services by adding server address to span
* i.e. {@link com.twitter.zipkin.gen.zipkinCoreConstants#SERVER_ADDR}
*
* @return request's target server endpoint information
*/
@Nullable
Endpoint serverAddress();
}
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* {@inheritDoc}
*/
@Override
@Nullable
public Span getCurrentClientSpan() {
return currentClientSpan.get();
}
代码示例来源:origin: io.zipkin.brave/brave-core
@Override
public void setCurrentLocalSpan(@Nullable Span span) {
if (span == null) {
currentLocalSpan.remove();
} else {
currentLocalSpan.set(span);
}
}
}
代码示例来源:origin: io.zipkin.brave/brave-core
@Override
public void setCurrentServerSpan(@Nullable ServerSpan span) {
if (span == null) {
currentServerSpan.remove();
} else {
currentServerSpan.set(span);
}
}
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Get parent span id.
*
* @return Parent span id. Can be <code>null</code>.
* @deprecated use {@link #nullableParentId()}
*/
@Deprecated
@Nullable
public Long getParentSpanId() {
return nullableParentId();
}
代码示例来源:origin: com.github.kristofa/brave-core
/**
* Get parent span id.
*
* @return Parent span id. Can be <code>null</code>.
* @deprecated use {@link #nullableParentId()}
*/
@Deprecated
@Nullable
public Long getParentSpanId() {
return nullableParentId();
}
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Should we sample this request or not? True means sample, false means don't, null means we defer
* decision to someone further down in the stack.
*/
@Nullable
public final Boolean sampled() {
if (debug()) return true;
return (flags & FLAG_SAMPLING_SET) == FLAG_SAMPLING_SET
? (flags & FLAG_SAMPLED) == FLAG_SAMPLED
: null;
}
代码示例来源:origin: com.github.kristofa/brave-core
BinaryAnnotation(String key, byte[] value, AnnotationType type, @Nullable Endpoint host) {
this.key = checkNotBlank(key, "Null or blank key");
this.value = checkNotNull(value, "Null value");
this.type = type;
this.host = host;
}
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* Creates a new span id.
*
* @param traceId Trace Id.
* @param spanId Span Id.
* @param parentSpanId Nullable parent span id.
* @deprecated Please use {@link SpanId.Builder}
*/
@Deprecated
public static SpanId create(long traceId, long spanId, @Nullable Long parentSpanId) {
return SpanId.builder().traceId(traceId).parentId(parentSpanId).spanId(spanId).build();
}
代码示例来源:origin: com.github.kristofa/brave-core
/**
* Creates a new span id.
*
* @param traceId Trace Id.
* @param spanId Span Id.
* @param parentSpanId Nullable parent span id.
* @deprecated Please use {@link SpanId.Builder}
*/
@Deprecated
public static SpanId create(long traceId, long spanId, @Nullable Long parentSpanId) {
return SpanId.builder().traceId(traceId).parentId(parentSpanId).spanId(spanId).build();
}
代码示例来源:origin: io.zipkin.brave/brave-core
/**
* @deprecated since 3.15 use {@link #setStateCurrentTrace(SpanId, String)}
*/
@Deprecated
public void setStateCurrentTrace(long traceId, long spanId, @Nullable Long parentSpanId, String name) {
SpanId context = SpanId.builder().traceId(traceId).spanId(spanId).parentId(parentSpanId).build();
setStateCurrentTrace(context, name);
}
内容来源于网络,如有侵权,请联系作者删除!