Class 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.