![JAR search and dependency download from the Maven repository](/logo.png)
com.alachisoft.ncache.client.internal.command.GetSerializationFormatCommand Maven / Gradle / Ivy
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.alachisoft.ncache.client.internal.command;
import com.alachisoft.ncache.common.protobuf.CommandProtocol;
import com.alachisoft.ncache.common.protobuf.GetSerializationFormatCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
/**
* @author Basit Anwer
*/
public class GetSerializationFormatCommand extends Command {
private GetSerializationFormatCommandProtocol.GetSerializationFormatCommand.Builder _getSerializationFormatCommandBuilder;
protected com.alachisoft.ncache.common.protobuf.GetSerializationFormatCommandProtocol.GetSerializationFormatCommand _commandInstance;
public GetSerializationFormatCommand(boolean isAsync) {
this.name = "GetSerializationFormatCommand";
this.isAsync = isAsync;
_getSerializationFormatCommandBuilder = GetSerializationFormatCommandProtocol.GetSerializationFormatCommand.newBuilder();
_getSerializationFormatCommandBuilder.setRequestId(super.getRequestId());
}
@Override
public CommandType getCommandType() {
return CommandType.GET_SERIALIZATION_FORMAT;
}
@Override
protected void createCommand() throws CommandException {
_commandInstance =_getSerializationFormatCommandBuilder.setRequestId(getRequestId()).build();
}
@Override
public RequestType getCommandRequestType() {
return RequestType.InternalCommand;
}
@Override
protected void serializeCommandInternal(ByteArrayOutputStream stream) throws IOException
{
_commandInstance.writeTo(stream);
}
@Override
protected short getCommandHandle()
{
return (short)CommandProtocol.Command.Type.GET_SERIALIZATION_FORMAT.getNumber();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy