![JAR search and dependency download from the Maven repository](/logo.png)
com.alachisoft.ncache.client.internal.command.HashSetGetRandomCommand Maven / Gradle / Ivy
package com.alachisoft.ncache.client.internal.command;
import Alachisoft.NCache.Common.DataTypes.HashSet.HashSetGetRandomOperation;
import com.alachisoft.ncache.common.protobuf.HashSetCommandProtocol;
import com.alachisoft.ncache.common.protobuf.HashSetGetRandomProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
public class HashSetGetRandomCommand extends HashSetCommandBase {
private int _count;
private HashSetGetRandomProtocol.HashSetGetRandom.Builder _hashSetGet;
public HashSetGetRandomCommand(HashSetGetRandomOperation operation)
{
super.name = "HashSetGetRandom";
super.key = operation.getName();
_lockId = (String) operation.getLockId();
_lockTimeout = operation.getLockTimeout();
_count = operation.getCount();
}
@Override
public RequestType getCommandRequestType()
{
return RequestType.AtomicRead;
}
@Override
public CommandType getCommandType()
{
return CommandType.DATA_TYPE;
}
@Override
protected void createCommand() throws CommandException {
_hashSetGet = HashSetGetRandomProtocol.HashSetGetRandom.newBuilder();
_hashSetGet.setCount(_count);
super.createCommand();
_hashSetCommandBuilder.setType(HashSetCommandProtocol.HashSetCommand.Type.HASHSET_GET_RANDOM);
_hashSetCommandBuilder.setHashSetGetRandom(_hashSetGet);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy