Class ReencryptionStatus
java.lang.Object
org.gridgain.internal.encryption.reencryption.ReencryptionStatus
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the possible states of a reencryption process. -
Constructor Summary
ConstructorsConstructorDescriptionReencryptionStatus(int keyId, ReencryptionStatus.State state) Creates a new reencryption status with the specified key ID and state.ReencryptionStatus(Map<Integer, Integer> partitionToIndex, Map<Integer, Integer> partitionToPageCount, ReencryptionStatus.State state, int keyId) Creates a new reencryption status with existing partition progress. -
Method Summary
Modifier and TypeMethodDescriptionintkeyId()Returns the ID of the encryption key being used for reencryption.intlastProcessedPageIndex(int partitionId) Returns the last processed page index for the specified partition.intpageCount(int partitionId) Returns the total page count for the specified partition.state()Returns the current state of the reencryption process.toString()voidupdateCount(int partitionId, int pageCount) Updates the total page count for a specific partition.voidupdateProgress(int partitionId, int lastProcessedPageIndex) Updates the reencryption progress for a specific partition.void
-
Constructor Details
-
ReencryptionStatus
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
Returns the current state of the reencryption process.- Returns:
- Current reencryption state.
-
updateState
-
partitionToIndex
-
partitionToPageCount
-
toString
-