Enum Class OperationLock

java.lang.Object
java.lang.Enum<OperationLock>
org.gridgain.internal.lock.OperationLock
All Implemented Interfaces:
Serializable, Comparable<OperationLock>, Constable

public enum OperationLock extends Enum<OperationLock>
Lock that prohibits conflicting operations.
  • Enum Constant Details

  • Method Details

    • values

      public static OperationLock[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OperationLock valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • start

      public CompletableFuture<Void> start(org.apache.ignite.internal.metastorage.MetaStorageManager mgr)
      Tries to start an operation. Allows consecutive calls of the same type.
      Returns:
      A completed future on success; otherwise a failed future if conflicting operation holds the lock.
    • stop

      public CompletableFuture<Void> stop(org.apache.ignite.internal.metastorage.MetaStorageManager mgr)
      Tries to stop an operation.
      Returns:
      A completed future on success; otherwise a failed future if conflicting operation holds the lock.
    • actual

      public static CompletableFuture<OperationLock> actual(org.apache.ignite.internal.metastorage.MetaStorageManager mgr)
      Returns the current operation, or null if no ongoing operations.