Class Lock

java.lang.Object
io.vertx.mutiny.core.shareddata.Lock
All Implemented Interfaces:
MutinyDelegate

public class Lock extends Object implements MutinyDelegate
An asynchronous exclusive lock which can be obtained from any node in the cluster.

When the lock is obtained, no-one else in the cluster can obtain the lock with the same name until the lock is released.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Tim Fox
See Also:
  • Lock
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TypeArg<Lock>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Lock(io.vertx.core.shareddata.Lock delegate)
    Create a new instance of Lock delegating to the given (non-null) instance of Lock.
    Lock(Object delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    io.vertx.core.shareddata.Lock
    Get the delegate instance.
    int
     
    static Lock
    newInstance(io.vertx.core.shareddata.Lock delegate)
    Creates a new instance of the Lock.
    void
    Release the lock.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • __TYPE_ARG

      public static final TypeArg<Lock> __TYPE_ARG
  • Constructor Details

    • Lock

      public Lock(io.vertx.core.shareddata.Lock delegate)
      Create a new instance of Lock delegating to the given (non-null) instance of Lock.
    • Lock

      public Lock(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.shareddata.Lock getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • release

      public void release()
      Release the lock. Once the lock is released another will be able to obtain the lock.
    • newInstance

      public static Lock newInstance(io.vertx.core.shareddata.Lock delegate)
      Creates a new instance of the Lock.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object