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

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

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

import Alachisoft.NCache.Common.DataTypes.Dictionary.DictionaryGetOperation;
import com.alachisoft.ncache.common.protobuf.DictionaryCommandProtocol;
import com.alachisoft.ncache.common.protobuf.DictionaryGetProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;

import java.util.List;
import java.util.Map;

public class DictionaryGetCommand extends DictionaryCommandBase {
    private List _collection;
    private DictionaryGetProtocol.DictionaryGet.Builder _dictionaryGetBuilder;

    public DictionaryGetCommand(DictionaryGetOperation operation)
    {
        super.name = "DictionaryGet";
        super.key = operation.getName();
        _lockTimeout = operation.getLockTimeout();
        _collection = operation.getCollection();
    }
    @Override
    public RequestType getCommandRequestType()
    {
        return RequestType.AtomicRead;
    }

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

    @Override
    protected void createCommand() throws CommandException {
        _dictionaryGetBuilder = DictionaryGetProtocol.DictionaryGet.newBuilder();
        _dictionaryGetBuilder.addAllCollection(_collection);

        super.createCommand();

        _dictionaryCommandBuilder.setType(DictionaryCommandProtocol.DictionaryCommand.Type.DICTIONARY_GET);
        _dictionaryCommandBuilder.setDictionaryGet(_dictionaryGetBuilder);

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy