All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alachisoft.ncache.client.internal.command.GetRunningServersCommand Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
package com.alachisoft.ncache.client.internal.command;

import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.GetRunningServersCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import com.google.protobuf.ByteString;

import java.io.IOException;

/**
 * @author Administrator
 */
public class GetRunningServersCommand extends Command {

    String cacheid;

    public GetRunningServersCommand(String id, byte[] userName, byte[] password) {
        name = "GetRunningServersCommand";
        this.cacheid = id;
    }

    @Override
    protected void createCommand() throws CommandException {

        GetRunningServersCommandProtocol.GetRunningServersCommand.Builder builder =
                GetRunningServersCommandProtocol.GetRunningServersCommand.newBuilder()
                        .setCacheId(this.cacheid);

        CommandProtocol.Command.Builder commandBuilder =
                CommandProtocol.Command.newBuilder();

        commandBuilder = commandBuilder.setGetRunningServersCommand(builder)
                .setRequestID(this.getRequestId())
                .setType(CommandProtocol.Command.Type.GET_RUNNING_SERVERS);
        _command = commandBuilder.build();

    }

    public CommandType getCommandType() {
        return CommandType.GET_RUNNING_SERVERS;
    }

    @Override
    public RequestType getCommandRequestType() {
        return RequestType.InternalCommand;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy