Package org.infinispan.xsite
Interface BackupReceiver
-
- All Known Implementing Classes:
ClusteredCacheBackupReceiver
public interface BackupReceiverComponent present on a backup site that manages the backup information and logic.- Since:
- 5.2
- Author:
- Mircea Markus
- See Also:
ClusteredCacheBackupReceiver
-
-
Method Summary
-
-
-
Method Detail
-
handleRemoteCommand
CompletionStage<Void> handleRemoteCommand(VisitableCommand command, boolean preserveOrder)
-
putKeyValue
CompletionStage<Void> putKeyValue(Object key, Object value, Metadata metadata, IracMetadata iracMetadata)
Updates the key with the value from a remote site.If a conflict occurs, the update can be discarded.
- Parameters:
key- The key to update.value- The new value.metadata- The newMetadata.iracMetadata- TheIracMetadatafor conflict resolution.- Returns:
- A
CompletionStagethat is completed when the update is apply in the cluster or is discarded.
-
removeKey
CompletionStage<Void> removeKey(Object key, IracMetadata iracMetadata)
Deletes the key.This is a request from the remote site and the removal can be discarded if a conflict happens.
- Parameters:
key- The key to delete.iracMetadata- TheIracMetadatafor conflict resolution.- Returns:
- A
CompletionStagethat is completed when the key is deleted or it is discarded.
-
clearKeys
CompletionStage<Void> clearKeys()
Clears the cache.This is not safe and it doesn't perform any conflict resolution.
- Returns:
- A
CompletionStagethat is completed when the cache is cleared.
-
forwardToPrimary
CompletionStage<Void> forwardToPrimary(IracUpdateKeyCommand command)
Forwards theIracUpdateKeyCommandto the primary owner.- Parameters:
command- TheIracUpdateKeyCommandto forward.- Returns:
- A
CompletionStagethat is completed when the primary owner completes the request.
-
handleStartReceivingStateTransfer
CompletionStage<Void> handleStartReceivingStateTransfer(XSiteStateTransferStartReceiveCommand command)
It handles starting the state transfer from a remote site. The command must be broadcast to the entire cluster in which the cache exists.
-
handleEndReceivingStateTransfer
CompletionStage<Void> handleEndReceivingStateTransfer(XSiteStateTransferFinishReceiveCommand command)
It handles finishing the state transfer from a remote site. The command must be broadcast to the entire cluster in which the cache exists.
-
handleStateTransferState
CompletionStage<Void> handleStateTransferState(XSiteStatePushCommand cmd)
It handles the state transfer state from a remote site. It is possible to have a single node applying the state or forward the state to respective primary owners.
-
-