Package io.lettuce.core.protocol
Class TracedCommand<K,V,T>
- java.lang.Object
-
- io.lettuce.core.protocol.CommandWrapper<K,V,T>
-
- io.lettuce.core.protocol.TracedCommand<K,V,T>
-
- All Implemented Interfaces:
CompleteableCommand<T>
,DecoratedCommand<K,V,T>
,RedisCommand<K,V,T>
,TraceContextProvider
public class TracedCommand<K,V,T> extends CommandWrapper<K,V,T> implements TraceContextProvider
Redis command that is aware of an associatedTraceContext
.- Since:
- 5.1
- Author:
- Mark Paluch
-
-
Field Summary
-
Fields inherited from class io.lettuce.core.protocol.CommandWrapper
command
-
-
Constructor Summary
Constructors Constructor Description TracedCommand(RedisCommand<K,V,T> command, TraceContext traceContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(ByteBuf buf)
Encode the command.Tracer.Span
getSpan()
TraceContext
getTraceContext()
void
setSpan(Tracer.Span span)
-
Methods inherited from class io.lettuce.core.protocol.CommandWrapper
cancel, complete, completeExceptionally, doOnComplete, doOnError, equals, getArgs, getDelegate, getOutput, getType, hashCode, isCancelled, isDone, onComplete, onComplete, setOutput, toString, unwrap, unwrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.lettuce.core.tracing.TraceContextProvider
getTraceContextLater
-
-
-
-
Constructor Detail
-
TracedCommand
public TracedCommand(RedisCommand<K,V,T> command, TraceContext traceContext)
-
-
Method Detail
-
getTraceContext
public TraceContext getTraceContext()
- Specified by:
getTraceContext
in interfaceTraceContextProvider
- Returns:
- the
TraceContext
.
-
getSpan
public Tracer.Span getSpan()
-
setSpan
public void setSpan(Tracer.Span span)
-
encode
public void encode(ByteBuf buf)
Description copied from interface:RedisCommand
Encode the command.- Specified by:
encode
in interfaceRedisCommand<K,V,T>
- Overrides:
encode
in classCommandWrapper<K,V,T>
- Parameters:
buf
- byte buffer to operate on.
-
-