Package org.apache.cassandra.utils
Class WithResources.None
- java.lang.Object
-
- org.apache.cassandra.utils.WithResources.None
-
- All Implemented Interfaces:
WithResources
- Enclosing interface:
- WithResources
public static class WithResources.None extends java.lang.Object implements WithResources
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.WithResources
WithResources.None
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Closeable
get()
Instantiate any necessary resourcesboolean
isNoOp()
A convenience method to avoid unnecessary work.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.WithResources
and
-
-
-
-
Method Detail
-
get
public Closeable get()
Description copied from interface:WithResources
Instantiate any necessary resources- Specified by:
get
in interfaceWithResources
- Returns:
- an object that closes any instantiated resources
-
isNoOp
public boolean isNoOp()
Description copied from interface:WithResources
A convenience method to avoid unnecessary work.- Specified by:
isNoOp
in interfaceWithResources
- Returns:
- true iff this object performs no work when
WithResources.get()
is invoked, nor whenCloseable.close()
is invoked on the object it returns.
-
-