
com.alachisoft.ncache.client.internal.command.GetServerMappingCommand Maven / Gradle / Ivy
package com.alachisoft.ncache.client.internal.command;
import com.alachisoft.ncache.client.internal.communication.Connection;
import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.GetServerMappingCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
public class GetServerMappingCommand extends InitialCommandBase {
private GetServerMappingCommandProtocol.GetServerMappingCommand.Builder serverMappingBuilder;
public GetServerMappingCommand() {
serverMappingBuilder = GetServerMappingCommandProtocol.GetServerMappingCommand.newBuilder();
serverMappingBuilder.setRequestId(super.getRequestId());
}
@Override
public CommandType getCommandType() {
return CommandType.GET_SERVER_MAPPING;
}
@Override
public RequestType getCommandRequestType() {
return RequestType.InternalCommand;
}
@Override
protected void createCommand() throws CommandException {
CommandProtocol.Command.Builder commandBuilder =
CommandProtocol.Command.newBuilder();
commandBuilder = commandBuilder.setGetServerMappingCommand(serverMappingBuilder)
.setRequestID(this.getRequestId())
.setType(CommandProtocol.Command.Type.GET_SERVER_MAPPING);
super._command = commandBuilder.build();
}
@Override
protected boolean getIsKeyBased() {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy