Package io.opencensus.implcore.internal
Class NoopScope
- java.lang.Object
-
- io.opencensus.implcore.internal.NoopScope
-
- All Implemented Interfaces:
NonThrowingCloseable
,Scope
,java.io.Closeable
,java.lang.AutoCloseable
public final class NoopScope extends java.lang.Object implements Scope
AScope
that does nothing when it is created or closed.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NoopScope()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static Scope
getInstance()
Returns aNoopScope
.
-
-
-
Field Detail
-
INSTANCE
private static final Scope INSTANCE
-
-
Method Detail
-
getInstance
public static Scope getInstance()
Returns aNoopScope
.- Returns:
- a
NoopScope
.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceNonThrowingCloseable
- Specified by:
close
in interfaceScope
-
-