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

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

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

import Alachisoft.NCache.Common.DataTypes.CollectionOperation;
import com.alachisoft.ncache.common.protobuf.CollectionCommandProtocol;
import com.alachisoft.ncache.runtime.caching.DistributedDataStructure;

public class CollectionCountCommand extends CollectionCommandBase {
    private DistributedDataStructure _collectionType;

    public CollectionCountCommand(CollectionOperation operation) {
        super.name = "CollectionCount";
        super.key = operation.getName();
        _lockId = (String)operation.getLockId();
        _lockTimeout = operation.getLockTimeout();
        _collectionType = operation.getType();
    }

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

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

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

        _collectionCommandBuilder.setMethod(CollectionCommandProtocol.CollectionCommand.Method.COLLECTION_GET_COUNT);
        _collectionCommandBuilder.setType(getCollectionType(_collectionType));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy