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)
BackupReceiver
handleStartReceivingStateTransfer
in interface BackupReceiver
public CompletionStage<Void> handleEndReceivingStateTransfer(XSiteStateTransferFinishReceiveCommand command)
BackupReceiver
handleEndReceivingStateTransfer
in interface BackupReceiver
public CompletionStage<Void> handleStateTransferState(XSiteStatePushCommand cmd)
BackupReceiver
handleStateTransferState
in interface BackupReceiver
public final CompletionStage<Void> handleRemoteCommand(VisitableCommand command, boolean preserveOrder)
handleRemoteCommand
in interface BackupReceiver
public CompletionStage<Void> putKeyValue(Object key, Object value, Metadata metadata, IracMetadata iracMetadata)
BackupReceiver
If a conflict occurs, the update can be discarded.
putKeyValue
in interface BackupReceiver
key
- 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)
BackupReceiver
This is a request from the remote site and the removal can be discarded if a conflict happens.
removeKey
in interface BackupReceiver
key
- 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()
BackupReceiver
This is not safe and it doesn't perform any conflict resolution.
clearKeys
in interface BackupReceiver
CompletionStage
that is completed when the cache is cleared.public CompletionStage<Void> forwardToPrimary(IracUpdateKeyCommand command)
BackupReceiver
IracUpdateKeyCommand
to the primary owner.forwardToPrimary
in interface BackupReceiver
command
- The IracUpdateKeyCommand
to forward.CompletionStage
that is completed when the primary owner completes the request.Copyright © 2021 JBoss by Red Hat. All rights reserved.