public class ClusteredCacheBackupReceiver extends Object implements BackupReceiver
BackupReceiver implementation for clustered caches.| Constructor and Description |
|---|
ClusteredCacheBackupReceiver(Configuration configuration,
String cacheName) |
public ClusteredCacheBackupReceiver(Configuration configuration, String cacheName)
public void start()
public CompletionStage<Void> handleStartReceivingStateTransfer(XSiteStateTransferStartReceiveCommand command)
BackupReceiverhandleStartReceivingStateTransfer in interface BackupReceiverpublic CompletionStage<Void> handleEndReceivingStateTransfer(XSiteStateTransferFinishReceiveCommand command)
BackupReceiverhandleEndReceivingStateTransfer in interface BackupReceiverpublic CompletionStage<Void> handleStateTransferState(XSiteStatePushCommand cmd)
BackupReceiverhandleStateTransferState in interface BackupReceiverpublic final CompletionStage<Void> handleRemoteCommand(VisitableCommand command, boolean preserveOrder)
handleRemoteCommand in interface BackupReceiverpublic CompletionStage<Void> putKeyValue(Object key, Object value, Metadata metadata, IracMetadata iracMetadata)
BackupReceiverIf a conflict occurs, the update can be discarded.
putKeyValue in interface BackupReceiverkey - The key to update.value - The new value.metadata - The new Metadata.iracMetadata - The IracMetadata for conflict resolution.CompletionStage that is completed when the update is apply in the cluster or is discarded.public CompletionStage<Void> removeKey(Object key, IracMetadata iracMetadata)
BackupReceiverThis is a request from the remote site and the removal can be discarded if a conflict happens.
removeKey in interface BackupReceiverkey - The key to delete.iracMetadata - The IracMetadata for conflict resolution.CompletionStage that is completed when the key is deleted or it is discarded.public CompletionStage<Void> clearKeys()
BackupReceiverThis is not safe and it doesn't perform any conflict resolution.
clearKeys in interface BackupReceiverCompletionStage that is completed when the cache is cleared.public CompletionStage<Void> forwardToPrimary(IracUpdateKeyCommand command)
BackupReceiverIracUpdateKeyCommand to the primary owner.forwardToPrimary in interface BackupReceivercommand - The IracUpdateKeyCommand to forward.CompletionStage that is completed when the primary owner completes the request.Copyright © 2021 JBoss by Red Hat. All rights reserved.