Package com.oracle.coherence.grpc.proxy
Class TracingDaemonPool
- java.lang.Object
-
- com.oracle.coherence.grpc.proxy.TracingDaemonPool
-
- All Implemented Interfaces:
com.tangosol.internal.util.DaemonPool,com.tangosol.io.ClassLoaderAware,com.tangosol.util.Controllable,Executor
public class TracingDaemonPool extends Object implements com.tangosol.internal.util.DaemonPool
ADaemonPoolimplementation that wraps anotherDaemonPooland adds activation of tracing spans for theRunnables executed by this pool.- Since:
- 20.06
- Author:
- Jonathan Knight 2020.01.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classTracingDaemonPool.TracingRunnableARunnablethat executes another runnable after activating a tracing span.
-
Field Summary
Fields Modifier and Type Field Description protected Supplier<io.opentracing.Span>f_activeSpanTheSupplierthat will provide active spans.protected com.tangosol.internal.util.DaemonPoolf_delegateTheDaemonPoolto delegate to.
-
Constructor Summary
Constructors Constructor Description TracingDaemonPool(com.tangosol.internal.util.DaemonPool delegate)Create aTracingDaemonPool.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Runnable task)voidconfigure(com.tangosol.run.xml.XmlElement xml)static TracingDaemonPoolensureTracingDaemonPool(com.tangosol.internal.util.DaemonPool pool)Returns aTracingDaemonPoolwrapping the specified pool.protected io.opentracing.SpanfindSpan()Return the current active span, or try to find the span in the currentContext.ClassLoadergetContextClassLoader()protected com.tangosol.internal.util.DaemonPoolgetDelegate()Returns theDaemonPoolto delegate to.com.tangosol.internal.util.DaemonPoolDependenciesgetDependencies()booleanisRunning()booleanisStuck()voidschedule(Runnable task, long cMillis)voidsetContextClassLoader(ClassLoader loader)voidsetDependencies(com.tangosol.internal.util.DaemonPoolDependencies deps)voidshutdown()voidstart()voidstop()
-
-
-
Constructor Detail
-
TracingDaemonPool
public TracingDaemonPool(com.tangosol.internal.util.DaemonPool delegate)
Create aTracingDaemonPool.- Parameters:
delegate- theDaemonPoolto delegate to
-
-
Method Detail
-
add
public void add(Runnable task)
- Specified by:
addin interfacecom.tangosol.internal.util.DaemonPool
-
getDependencies
public com.tangosol.internal.util.DaemonPoolDependencies getDependencies()
- Specified by:
getDependenciesin interfacecom.tangosol.internal.util.DaemonPool
-
setDependencies
public void setDependencies(com.tangosol.internal.util.DaemonPoolDependencies deps)
- Specified by:
setDependenciesin interfacecom.tangosol.internal.util.DaemonPool
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfacecom.tangosol.util.Controllable
-
isStuck
public boolean isStuck()
- Specified by:
isStuckin interfacecom.tangosol.internal.util.DaemonPool
-
schedule
public void schedule(Runnable task, long cMillis)
- Specified by:
schedulein interfacecom.tangosol.internal.util.DaemonPool
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfacecom.tangosol.util.Controllable
-
start
public void start()
- Specified by:
startin interfacecom.tangosol.util.Controllable
-
stop
public void stop()
- Specified by:
stopin interfacecom.tangosol.util.Controllable
-
configure
public void configure(com.tangosol.run.xml.XmlElement xml)
- Specified by:
configurein interfacecom.tangosol.util.Controllable
-
getContextClassLoader
public ClassLoader getContextClassLoader()
- Specified by:
getContextClassLoaderin interfacecom.tangosol.io.ClassLoaderAware
-
setContextClassLoader
public void setContextClassLoader(ClassLoader loader)
- Specified by:
setContextClassLoaderin interfacecom.tangosol.io.ClassLoaderAware
-
findSpan
protected io.opentracing.Span findSpan()
Return the current active span, or try to find the span in the currentContext.- Returns:
- the current active span, or try to find the span in the current
Context
-
getDelegate
protected com.tangosol.internal.util.DaemonPool getDelegate()
Returns theDaemonPoolto delegate to.- Returns:
- the
DaemonPoolto delegate to
-
ensureTracingDaemonPool
public static TracingDaemonPool ensureTracingDaemonPool(com.tangosol.internal.util.DaemonPool pool)
Returns aTracingDaemonPoolwrapping the specified pool.- Parameters:
pool- the pool to wrap or return- Returns:
- a
TracingDaemonPool
-
-