
com.alachisoft.ncache.client.internal.command.DisposeCommand Maven / Gradle / Ivy
/*
* ClearCommand.java
*
* Created on September 12, 2006, 12:04 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.DisposeCommandProtocol;
import com.alachisoft.ncache.runtime.exceptions.CommandException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
/**
* @author Administrator
* @version 1.0
*/
public final class DisposeCommand extends Command {
/**
* Creates a new instance of ClearCommand
*
* @param isAsync
*/
protected com.alachisoft.ncache.common.protobuf.DisposeCommandProtocol.DisposeCommand _commandInstance;
public DisposeCommand(boolean isAsync) {
this.isAsync = isAsync;
}
public DisposeCommand() {
}
protected void createCommand() throws CommandException {
_commandInstance =DisposeCommandProtocol.DisposeCommand
.newBuilder().setRequestId(this.getRequestId()).build();
}
@Override
public CommandType getCommandType() {
return CommandType.DISPOSE;
}
@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.DISPOSE.getNumber();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy