Class CloseableMonitor.Hold
- java.lang.Object
-
- com.google.cloud.pubsublite.internal.CloseableMonitor.Hold
-
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- CloseableMonitor
public class CloseableMonitor.Hold extends Object implements AutoCloseable
This is meant for use in the try-with-resources pattern. It will call leave() on a Monitor when it goes out of scope. This is cannot be constructed directly, but through usage of the static utility methods above.
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-