com.hazelcast.concurrent.lock.operations

## Class LocalLockCleanupOperation

- java.lang.Object
- - com.hazelcast.spi.Operation
  - - com.hazelcast.concurrent.lock.operations.AbstractLockOperation
    - - com.hazelcast.concurrent.lock.operations.UnlockOperation
      - - com.hazelcast.concurrent.lock.operations.LocalLockCleanupOperation

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned, BackupAwareOperation, com.hazelcast.spi.impl.MutatingOperation, com.hazelcast.spi.impl.QuorumCheckAwareOperation, NamedOperation, Notifier, PartitionAwareOperation, ServiceNamespaceAware

      public class LocalLockCleanupOperation
      extends UnlockOperation
      implements Notifier, BackupAwareOperation, com.hazelcast.spi.impl.QuorumCheckAwareOperation

  Locally executed operation which unlocks a lock if it is held by a specific owner.

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.concurrent.lock.operations.AbstractLockOperation

      `ANY_THREAD, key, leaseTime, namespace, response, threadId`

    - ### Fields inherited from class com.hazelcast.spi.Operation

      `GENERIC_PARTITION_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalLockCleanupOperation()` This constructor should not be used to obtain an instance of this class; it exists to fulfill IdentifiedDataSerializable coding conventions.
    `LocalLockCleanupOperation(ObjectNamespace namespace, Data key, String uuid)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getId()` Returns type identifier for this class.
    `protected void` | `readInternal(ObjectDataInput in)`
    `void` | `run()` Runs the operation.
    `boolean` | `shouldBackup()` Checks if a backup needs to be made.
    `boolean` | `shouldCheckQuorum()` Returns `true` if the quorum check should be performed.
    `protected void` | `writeInternal(ObjectDataOutput out)`

    - ### Methods inherited from class com.hazelcast.concurrent.lock.operations.UnlockOperation

      `afterRun, forceUnlock, getBackupOperation, getNotifiedKey, shouldNotify, unlock`

    - ### Methods inherited from class com.hazelcast.concurrent.lock.operations.AbstractLockOperation

      `getAsyncBackupCount, getFactoryId, getKey, getLockStore, getName, getReferenceCallId, getResponse, getServiceName, getServiceNamespace, getSyncBackupCount, interceptLockOperation, onSetCallId, setAsyncBackup, setReferenceCallId, toString`

    - ### Methods inherited from class com.hazelcast.spi.Operation

      `beforeRun, call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getService, getWaitTimeout, isUrgent, logError, onExecutionFailure, onInvocationException, readData, requiresExplicitServiceName, returnsResponse, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.hazelcast.spi.Notifier

      `getNotifiedKey, shouldNotify`

    - ### Methods inherited from interface com.hazelcast.spi.BackupAwareOperation

      `getAsyncBackupCount, getBackupOperation, getSyncBackupCount`

    - ### Methods inherited from interface com.hazelcast.spi.PartitionAwareOperation

      `getPartitionId`

    - ### Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable

      `readData, writeData`

- - ### Constructor Detail

    - #### LocalLockCleanupOperation

          public LocalLockCleanupOperation()

      This constructor should not be used to obtain an instance of this class; it exists to fulfill IdentifiedDataSerializable coding conventions.

    - #### LocalLockCleanupOperation

          public LocalLockCleanupOperation(ObjectNamespace namespace,
                                           Data key,
                                           String uuid)

  - ### Method Detail

    - #### run

          public void run()
                   throws Exception

      Description copied from class: `Operation`
      Runs the operation. Either the `Operation.run()` or `Operation.call()` method should be implemented; not both. Runs after wait-support, supposed to do actual operation
      Overrides:
        `run` in class `UnlockOperation`
      Throws:
        `Exception`
      See Also:
        `Operation.call()`

    - #### shouldBackup

          public boolean shouldBackup()

      Description copied from interface: `BackupAwareOperation`
      Checks if a backup needs to be made.

      If a call has not made any change, e.g. an AtomicLong increment with 0, no backup needs to be made.
      Specified by:
        `shouldBackup` in interface `BackupAwareOperation`
      Overrides:
        `shouldBackup` in class `UnlockOperation`
      Returns:
        true if a backup needs to be made, false otherwise.

    - #### writeInternal

          protected void writeInternal(ObjectDataOutput out)
                                throws IOException

      Overrides:
        `writeInternal` in class `UnlockOperation`
      Throws:
        `IOException`

    - #### readInternal

          protected void readInternal(ObjectDataInput in)
                               throws IOException

      Overrides:
        `readInternal` in class `UnlockOperation`
      Throws:
        `IOException`

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Overrides:
        `getId` in class `UnlockOperation`
      Returns:
        type ID

    - #### shouldCheckQuorum

          public boolean shouldCheckQuorum()

      Description copied from interface: `com.hazelcast.spi.impl.QuorumCheckAwareOperation`
      Returns `true` if the quorum check should be performed. Operations which require a quorum check may get rejected if there are not enough members in the cluster.
      Specified by:
        `shouldCheckQuorum` in interface `com.hazelcast.spi.impl.QuorumCheckAwareOperation`

Copyright © 2019. All rights reserved.