com.hazelcast.spi

## Interface PartitionAwareOperation

- All Known Subinterfaces:
    BackupAwareOperation, BackupOperation
  All Known Implementing Classes:
    AbstractAlterOperation, AbstractAlterOperation, AbstractAtomicLongOperation, AbstractAtomicReferenceOperation, AbstractLockOperation, AcquireBackupOperation, AcquireOperation, AddAndGetOperation, AddBackupOperation, AlterAndGetOperation, AlterAndGetOperation, AlterOperation, AlterOperation, ApplyOperation, ApplyOperation, AtomicLongBackupAwareOperation, AtomicReferenceBackupAwareOperation, AvailableOperation, AwaitBackupOperation, AwaitOperation, AwaitOperation, BeforeAwaitBackupOperation, BeforeAwaitOperation, CompareAndSetOperation, CompareAndSetOperation, ContainsOperation, CountDownLatchBackupOperation, CountDownOperation, DrainBackupOperation, DrainOperation, GetAndAddOperation, GetAndAlterOperation, GetAndAlterOperation, GetAndSetOperation, GetAndSetOperation, GetCountOperation, GetLockCountOperation, GetOperation, GetOperation, GetRemainingLeaseTimeOperation, IncreaseBackupOperation, IncreaseOperation, InitBackupOperation, InitOperation, IsLockedOperation, IsNullOperation, LocalLockCleanupOperation, LockBackupOperation, LockOperation, MergeBackupOperation, MergeBackupOperation, MergeOperation, MergeOperation, ReduceBackupOperation, ReduceOperation, ReleaseBackupOperation, ReleaseOperation, SemaphoreBackupAwareOperation, SemaphoreBackupOperation, SemaphoreDetachMemberBackupOperation, SemaphoreDetachMemberOperation, SemaphoreOperation, SetAndGetOperation, SetBackupOperation, SetBackupOperation, SetCountOperation, SetOperation, SetOperation, SignalBackupOperation, SignalOperation, UnlockBackupOperation, UnlockIfLeaseExpiredOperation, UnlockOperation

      public interface PartitionAwareOperation

  An interface that can be implemented by an operation to indicate that it should be invoked on a particular partition. This interface only has meaning for documentation purposes. Because every operation has a `Operation.getPartitionId()` method, the system will use that to determine if an Operation is partition-aware. So the system is fine if you create an Operation that doesn't implement PartitionAwareOperation, but returns a partitionId equal or larger than 0 (and therefore is partition-specific). But it is also fine if you do implement the PartitionAwareOperation interface and return -1 as partition ID (the operation therefore is not specific to a partition).
  Author:
    mdogan 12/3/12

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPartitionId()` Gets the partition ID.

- - ### Method Detail

    - #### getPartitionId

          int getPartitionId()

      Gets the partition ID.
      Returns:
        the partition ID
      See Also:
        `Operation.getPartitionId()`

Copyright © 2020. All rights reserved.