
com.alachisoft.ncache.client.internal.command.GetEnumCommand Maven / Gradle / Ivy
/*
* GetCommand.java
*
* Created on September 11, 2006, 5:06 PM
*
* Copyright 2005 Alachisoft, Inc. All rights reserved.
* ALACHISOFT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.alachisoft.ncache.client.internal.command;
import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.GetEnumeratorCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import java.io.IOException;
/**
* @author Administrator
* @version 1.0
*/
public final class GetEnumCommand extends Command {
/**
* Creates a new instance of GetCommand
*
* @param key
* @param group
* @param subGroup
* @param isAsync
*/
public GetEnumCommand() {
this.name = "GETENUM";
}
/**
* @return
*/
protected boolean parseCommand() {
return true;
}
protected void createCommand() throws CommandException {
try {
commandBytes = super.constructCommand(CommandProtocol.Command.newBuilder()
.setGetEnumeratorCommand(GetEnumeratorCommandProtocol.GetEnumeratorCommand
.newBuilder().setRequestId(this.getRequestId()))
.setRequestID(this.getRequestId())
.setType(CommandProtocol.Command.Type.GET_ENUMERATOR).build().toByteArray());
// commandBytes = constructCommand("GETENUM \"" + getRequestId()
// + "\"", new byte[0]);
} catch (IOException ex) {
throw new CommandException(ex.getMessage());
}
}
public CommandType getCommandType() {
return CommandType.GET_ENUMERATOR;
}
@Override
public RequestType getCommandRequestType() {
return RequestType.AtomicRead;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy