org.infinispan.commands.write.BackupAckCommand Maven / Gradle / Ivy
package org.infinispan.commands.write;
import org.infinispan.commands.CommandInvocationId;
import org.infinispan.commands.remote.BaseRpcCommand;
import org.infinispan.util.ByteString;
import org.infinispan.util.concurrent.CommandAckCollector;
import org.infinispan.util.concurrent.CompletableFutures;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.concurrent.CompletableFuture;
/**
* A command that represents an acknowledge sent by a backup owner to the originator.
*
* The acknowledge signals a successful execution of the operation.
*
* @author Pedro Ruivo
* @since 9.0
*/
public class BackupAckCommand extends BaseRpcCommand {
public static final byte COMMAND_ID = 2;
private CommandInvocationId commandInvocationId;
private CommandAckCollector commandAckCollector;
private int topologyId;
public BackupAckCommand() {
super(null);
}
public BackupAckCommand(ByteString cacheName) {
super(cacheName);
}
public BackupAckCommand(ByteString cacheName, CommandInvocationId commandInvocationId, int topologyId) {
super(cacheName);
this.commandInvocationId = commandInvocationId;
this.topologyId = topologyId;
}
@Override
public CompletableFuture