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
AScopethat does nothing when it is created or closed.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopScope()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static ScopegetInstance()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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceNonThrowingCloseable- Specified by:
closein interfaceScope
-
-