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

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

package com.alachisoft.ncache.client.internal.command;

import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.GetLoggingInfoCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;

import java.io.IOException;

public class GetLogginInfoCommand extends Command {


    public GetLogginInfoCommand() {
        name = "GetLogginInfoCommand";
    }

    @Override
    public CommandType getCommandType() {
        return CommandType.GET_LOGGING_INFO;
    }

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

    @Override
    protected void createCommand() throws CommandException {
        GetLoggingInfoCommandProtocol.GetLoggingInfoCommand.Builder builder = GetLoggingInfoCommandProtocol.GetLoggingInfoCommand.newBuilder();
        builder = builder.setRequestId(getRequestId());
        try {
            CommandProtocol.Command.Builder commandBuilder =
                    CommandProtocol.Command.newBuilder();

            commandBuilder = commandBuilder.setGetLoggingInfoCommand(builder)
                    .setRequestID(this.getRequestId())
                    .setType(CommandProtocol.Command.Type.GET_LOGGING_INFO);

            commandBytes = this.constructCommand(commandBuilder.build().toByteArray());
        } catch (IOException ex) {
            throw new CommandException(ex.getMessage());
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy