Package org.gridgain.internal.lock
Enum Class OperationLock
- All Implemented Interfaces:
Serializable,Comparable<OperationLock>,Constable
Lock that prohibits conflicting operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<OperationLock>actual(org.apache.ignite.internal.metastorage.MetaStorageManager mgr) Returns the current operation, or null if no ongoing operations.start(org.apache.ignite.internal.metastorage.MetaStorageManager mgr) Tries to start an operation.stop(org.apache.ignite.internal.metastorage.MetaStorageManager mgr) Tries to stop an operation.static OperationLockReturns the enum constant of this class with the specified name.static OperationLock[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PITR
-
ROLLING_UPGRADE
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
start
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
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.
-