Class ReencryptionStatus

java.lang.Object
org.gridgain.internal.encryption.reencryption.ReencryptionStatus

public class ReencryptionStatus extends Object
Tracks the status and progress of data reencryption operations across storage partitions.

This class maintains the state of ongoing or completed reencryption processes, including the progress of each partition and the encryption key being used.

  • Constructor Details

    • ReencryptionStatus

      public ReencryptionStatus(int keyId, ReencryptionStatus.State state)
      Creates a new reencryption status with the specified key ID and state.
      Parameters:
      keyId - ID of the encryption key being used for reencryption.
      state - Initial state of the reencryption process.
    • ReencryptionStatus

      public ReencryptionStatus(Map<Integer,Integer> partitionToIndex, Map<Integer,Integer> partitionToPageCount, ReencryptionStatus.State state, int keyId)
      Creates a new reencryption status with existing partition progress.
      Parameters:
      partitionToIndex - Mapping from partition ID to last processed page index.
      partitionToPageCount - Mapping from partition ID to page count.
      state - Initial state of the reencryption process.
      keyId - ID of the encryption key being used for reencryption.
  • Method Details

    • updateProgress

      public void updateProgress(int partitionId, int lastProcessedPageIndex)
      Updates the reencryption progress for a specific partition.
      Parameters:
      partitionId - ID of the partition being reencrypted.
      lastProcessedPageIndex - Index of the last page that has been processed.
    • updateCount

      public void updateCount(int partitionId, int pageCount)
      Updates the total page count for a specific partition.
      Parameters:
      partitionId - ID of the partition.
      pageCount - Total number of pages in the partition.
    • keyId

      public int keyId()
      Returns the ID of the encryption key being used for reencryption.
      Returns:
      Encryption key ID.
    • lastProcessedPageIndex

      public int lastProcessedPageIndex(int partitionId)
      Returns the last processed page index for the specified partition.
      Parameters:
      partitionId - ID of the partition.
      Returns:
      Last processed page index, or 0 if the partition has not been processed yet.
    • pageCount

      public int pageCount(int partitionId)
      Returns the total page count for the specified partition.
      Parameters:
      partitionId - ID of the partition.
      Returns:
      Total page count, or -1 if the count is not available.
    • state

      public ReencryptionStatus.State state()
      Returns the current state of the reencryption process.
      Returns:
      Current reencryption state.
    • updateState

      public void updateState(ReencryptionStatus.State state)
    • partitionToIndex

      public Map<Integer,Integer> partitionToIndex()
    • partitionToPageCount

      public Map<Integer,Integer> partitionToPageCount()
    • toString

      public String toString()
      Overrides:
      toString in class Object