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

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

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

import Alachisoft.NCache.Common.DataTypes.List.ListGetBulkOperation;
import com.alachisoft.ncache.common.protobuf.ListCommandProtocol;
import com.alachisoft.ncache.common.protobuf.ListGetBulkItemsProtocol;

public class ListGetBulkItemsCommand extends ListCommandBase {
    ListGetBulkItemsProtocol.ListGetBulkItems.Builder _listGetBulkItemsBuilder;

    public ListGetBulkItemsCommand(ListGetBulkOperation operation)
    {
        super.name = "ListGetBulkItems";
        super.key = operation.getName();

        _listGetBulkItemsBuilder = ListGetBulkItemsProtocol.ListGetBulkItems.newBuilder();
        _listGetBulkItemsBuilder.setIndex(operation.getIndex());
        _listGetBulkItemsBuilder.setCount(operation.getCount());
        _lockId = (String)operation.getLockId();
        _lockTimeout = operation.getLockTimeout();
    }

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

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

    @Override
    protected void createCommand()
    {
        super.createCommand();

        _listCommandBuilder.setType(ListCommandProtocol.ListCommand.Type.LIST_GET_BULK_ITEMS);
        _listCommandBuilder.setListGetBulkItems(_listGetBulkItemsBuilder);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy