/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package test.command.rpc;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-02-01")
public class ExecuteCommand {
public interface Iface {
public Response execute(Request request, CommandContext commandContext) throws org.apache.thrift.TException;
}
public interface AsyncIface {
public void execute(Request request, CommandContext commandContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public Response execute(Request request, CommandContext commandContext) throws org.apache.thrift.TException
{
send_execute(request, commandContext);
return recv_execute();
}
public void send_execute(Request request, CommandContext commandContext) throws org.apache.thrift.TException
{
execute_args args = new execute_args();
args.setRequest(request);
args.setCommandContext(commandContext);
sendBase("execute", args);
}
public Response recv_execute() throws org.apache.thrift.TException
{
execute_result result = new execute_result();
receiveBase(result, "execute");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "execute failed: unknown result");
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void execute(Request request, CommandContext commandContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
execute_call method_call = new execute_call(request, commandContext, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class execute_call extends org.apache.thrift.async.TAsyncMethodCall {
private Request request;
private CommandContext commandContext;
public execute_call(Request request, CommandContext commandContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.request = request;
this.commandContext = commandContext;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("execute", org.apache.thrift.protocol.TMessageType.CALL, 0));
execute_args args = new execute_args();
args.setRequest(request);
args.setCommandContext(commandContext);
args.write(prot);
prot.writeMessageEnd();
}
public Response getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_execute();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("execute", new execute());
return processMap;
}
public static class execute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_args> {
public execute() {
super("execute");
}
public execute_args getEmptyArgsInstance() {
return new execute_args();
}
protected boolean isOneway() {
return false;
}
public execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException {
execute_result result = new execute_result();
result.success = iface.execute(args.request, args.commandContext);
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, Map<
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
命令模式实现事务补偿2 (116个子文件)
ExecuteCommand$execute_args.class 12KB
Response.class 11KB
Request.class 11KB
ExecuteCommand$execute_result.class 10KB
UndoCommand$undo_args.class 10KB
HandleRemoteInvoker.class 10KB
CommandContext.class 10KB
ParallelInvoker.class 8KB
UndoCommand$undo_result.class 8KB
SerialInvoker.class 5KB
ExecuteCommand$AsyncClient$execute_call.class 3KB
ExecuteCommand$AsyncProcessor$execute.class 3KB
UndoCommand$AsyncProcessor$undo.class 3KB
UndoCommand$AsyncClient$undo_call.class 3KB
ExecuteCommand$execute_args$_Fields.class 3KB
App$2.class 3KB
App$1.class 3KB
ExecuteCommand$execute_result$_Fields.class 3KB
UndoCommand$undo_args$_Fields.class 3KB
ExecuteCommand$execute_args$execute_argsStandardScheme.class 3KB
ExecuteCommand$AsyncProcessor$execute$1.class 3KB
Response$_Fields.class 3KB
Request$_Fields.class 3KB
UndoCommand$undo_result$_Fields.class 3KB
CommandContext$_Fields.class 3KB
UndoCommand$AsyncProcessor$undo$1.class 3KB
Response$ResponseStandardScheme.class 3KB
HandleRemoteInvoker$ParallelCallable.class 3KB
ExecuteCommand$execute_result$execute_resultStandardScheme.class 3KB
ParallelInvoker$ParallelCallable.class 3KB
UndoCommand$undo_args$undo_argsStandardScheme.class 3KB
Request$RequestStandardScheme.class 3KB
HandleRemoteInvoker$ParallelReverseCallable.class 3KB
CommandContext$CommandContextStandardScheme.class 3KB
ParallelInvoker$ParallelReverseCallable.class 3KB
ExecuteCommand$execute_args$execute_argsTupleScheme.class 2KB
ExecuteCommand$Client.class 2KB
ExecuteCommand$Processor$execute.class 2KB
ExecuteCommand$AsyncProcessor.class 2KB
UndoCommand$AsyncProcessor.class 2KB
SecondExecuteCommand.class 2KB
FirstExecuteCommand.class 2KB
ExecuteCommand$execute_result$execute_resultTupleScheme.class 2KB
UndoCommand$undo_result$undo_resultStandardScheme.class 2KB
UndoCommand$undo_args$undo_argsTupleScheme.class 2KB
ExecuteCommand$AsyncClient.class 2KB
UndoCommand$Processor$undo.class 2KB
UndoCommand$AsyncClient.class 2KB
ExecuteCommand$Processor.class 2KB
RemoteInfo.class 2KB
UndoCommand$Processor.class 2KB
Response$ResponseTupleScheme.class 2KB
UndoCommand$Client.class 2KB
Invoker.class 2KB
Request$RequestTupleScheme.class 2KB
CommandContext$CommandContextTupleScheme.class 2KB
FirstUndoCommand.class 2KB
ExecuteCommand$AsyncClient$Factory.class 2KB
ExecuteCommand$Client$Factory.class 2KB
UndoCommand$AsyncClient$Factory.class 2KB
UndoCommand$Client$Factory.class 1KB
RESCODE.class 1KB
UndoCommand$undo_result$undo_resultTupleScheme.class 1KB
SecondUndoCommand.class 1KB
ExecuteCommand$execute_result$execute_resultStandardSchemeFactory.class 1KB
ExecuteCommand$execute_result$execute_resultTupleSchemeFactory.class 1KB
ExecuteCommand$execute_args$execute_argsStandardSchemeFactory.class 1KB
ExecuteCommand$execute_args$execute_argsTupleSchemeFactory.class 1KB
UndoCommand$undo_result$undo_resultStandardSchemeFactory.class 1KB
UndoCommand$undo_result$undo_resultTupleSchemeFactory.class 1KB
UndoCommand$undo_args$undo_argsStandardSchemeFactory.class 1KB
UndoCommand$undo_args$undo_argsTupleSchemeFactory.class 1KB
CommandContext$CommandContextStandardSchemeFactory.class 1KB
CommandContext$CommandContextTupleSchemeFactory.class 1KB
SpringBootApp.class 1KB
Response$ResponseStandardSchemeFactory.class 987B
Request$RequestStandardSchemeFactory.class 971B
App.class 968B
Response$ResponseTupleSchemeFactory.class 963B
Request$RequestTupleSchemeFactory.class 947B
ExecuteCommand.class 878B
UndoCommand.class 833B
ExecuteCommand$AsyncIface.class 403B
ExecuteCommand$Iface.class 374B
UndoCommand$AsyncIface.class 365B
UndoCommand$Iface.class 310B
.classpath 1KB
errorlog 37B
.factorypath 8KB
ExecuteCommand.java 37KB
UndoCommand.java 28KB
Response.java 15KB
Request.java 14KB
HandleRemoteInvoker.java 11KB
CommandContext.java 11KB
ParallelInvoker.java 11KB
SerialInvoker.java 7KB
App.java 3KB
FirstExecuteCommand.java 2KB
SecondExecuteCommand.java 2KB
共 116 条
- 1
- 2
资源评论
- 冰河2018-09-01不错,可以的
说好不能打脸
- 粉丝: 1w+
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功