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

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

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.alachisoft.ncache.client.internal.command;

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

import java.io.IOException;

public class GetThresholdCommand extends Command {

    private GetThresholdSizeCommandProtocol.GetThresholdSizeCommand.Builder builder;

    public GetThresholdCommand(boolean _isAsync) {
        this.name = "GetThresholdCommand";
        this.isAsync = _isAsync;
        builder = GetThresholdSizeCommandProtocol.GetThresholdSizeCommand.newBuilder();
        builder.setRequestId(super.getRequestId());
    }

    @Override
    protected void createCommand() throws CommandException {
        CommandProtocol.Command.Builder commandBuilder = CommandProtocol.Command.newBuilder();
        commandBuilder.setGetThresholdSizeCommand(builder)
                .setRequestID(this.getRequestId())
                .setType(CommandProtocol.Command.Type.GET_THRESHOLD_SIZE);
        _command = commandBuilder.build();
    }

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

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

    @Override
    public boolean getIsKeyBased() {
        return false;
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy