Class BlockLock

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class BlockLock
    extends CloseableResource<java.lang.Long>
    A resource lock for block.
    • Constructor Summary

      Constructors 
      Constructor Description
      BlockLock​(long lockId, java.util.function.Consumer<java.lang.Long> unlock)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeResource()
      Performs any cleanup operations necessary when the resource is no longer in use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BlockLock

        public BlockLock​(long lockId,
                         java.util.function.Consumer<java.lang.Long> unlock)
        Parameters:
        lockId - lockId
        unlock - unlock function
    • Method Detail

      • closeResource

        public void closeResource()
        Description copied from class: CloseableResource
        Performs any cleanup operations necessary when the resource is no longer in use.
        Specified by:
        closeResource in class CloseableResource<java.lang.Long>