curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [18/50] [abbrv] started work on service discovery
Date Sat, 07 Jun 2014 18:19:16 GMT
http://git-wip-us.apache.org/repos/asf/curator/blob/87582a9b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java
new file mode 100644
index 0000000..a082b33
--- /dev/null
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java
@@ -0,0 +1,3339 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.curator.generated;
+
+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.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+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.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DiscoveryServiceLowLevel {
+
+  public interface Iface {
+
+    public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException;
+
+    public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException;
+
+    public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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 void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException
+    {
+      send_registerInstance(projection, discoveryProjection, instance);
+      recv_registerInstance();
+    }
+
+    public void send_registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws org.apache.thrift.TException
+    {
+      registerInstance_args args = new registerInstance_args();
+      args.setProjection(projection);
+      args.setDiscoveryProjection(discoveryProjection);
+      args.setInstance(instance);
+      sendBase("registerInstance", args);
+    }
+
+    public void recv_registerInstance() throws CuratorException, org.apache.thrift.TException
+    {
+      registerInstance_result result = new registerInstance_result();
+      receiveBase(result, "registerInstance");
+      if (result.ex1 != null) {
+        throw result.ex1;
+      }
+      return;
+    }
+
+    public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException
+    {
+      send_unregisterInstance(projection, discoveryProjection, instance);
+      recv_unregisterInstance();
+    }
+
+    public void send_unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws org.apache.thrift.TException
+    {
+      unregisterInstance_args args = new unregisterInstance_args();
+      args.setProjection(projection);
+      args.setDiscoveryProjection(discoveryProjection);
+      args.setInstance(instance);
+      sendBase("unregisterInstance", args);
+    }
+
+    public void recv_unregisterInstance() throws CuratorException, org.apache.thrift.TException
+    {
+      unregisterInstance_result result = new unregisterInstance_result();
+      receiveBase(result, "unregisterInstance");
+      if (result.ex1 != null) {
+        throw result.ex1;
+      }
+      return;
+    }
+
+    public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException
+    {
+      send_updateInstance(projection, discoveryProjection, instance);
+      recv_updateInstance();
+    }
+
+    public void send_updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws org.apache.thrift.TException
+    {
+      updateInstance_args args = new updateInstance_args();
+      args.setProjection(projection);
+      args.setDiscoveryProjection(discoveryProjection);
+      args.setInstance(instance);
+      sendBase("updateInstance", args);
+    }
+
+    public void recv_updateInstance() throws CuratorException, org.apache.thrift.TException
+    {
+      updateInstance_result result = new updateInstance_result();
+      receiveBase(result, "updateInstance");
+      if (result.ex1 != null) {
+        throw result.ex1;
+      }
+      return;
+    }
+
+  }
+  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 registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      registerInstance_call method_call = new registerInstance_call(projection, discoveryProjection, instance, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class registerInstance_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private CuratorProjection projection;
+      private DiscoveryProjection discoveryProjection;
+      private DiscoveryInstance instance;
+      public registerInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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.projection = projection;
+        this.discoveryProjection = discoveryProjection;
+        this.instance = instance;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        registerInstance_args args = new registerInstance_args();
+        args.setProjection(projection);
+        args.setDiscoveryProjection(discoveryProjection);
+        args.setInstance(instance);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws CuratorException, 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);
+        (new Client(prot)).recv_registerInstance();
+      }
+    }
+
+    public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      unregisterInstance_call method_call = new unregisterInstance_call(projection, discoveryProjection, instance, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class unregisterInstance_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private CuratorProjection projection;
+      private DiscoveryProjection discoveryProjection;
+      private DiscoveryInstance instance;
+      public unregisterInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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.projection = projection;
+        this.discoveryProjection = discoveryProjection;
+        this.instance = instance;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unregisterInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        unregisterInstance_args args = new unregisterInstance_args();
+        args.setProjection(projection);
+        args.setDiscoveryProjection(discoveryProjection);
+        args.setInstance(instance);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws CuratorException, 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);
+        (new Client(prot)).recv_unregisterInstance();
+      }
+    }
+
+    public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      updateInstance_call method_call = new updateInstance_call(projection, discoveryProjection, instance, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class updateInstance_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private CuratorProjection projection;
+      private DiscoveryProjection discoveryProjection;
+      private DiscoveryInstance instance;
+      public updateInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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.projection = projection;
+        this.discoveryProjection = discoveryProjection;
+        this.instance = instance;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        updateInstance_args args = new updateInstance_args();
+        args.setProjection(projection);
+        args.setDiscoveryProjection(discoveryProjection);
+        args.setInstance(instance);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws CuratorException, 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);
+        (new Client(prot)).recv_updateInstance();
+      }
+    }
+
+  }
+
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+    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("registerInstance", new registerInstance());
+      processMap.put("unregisterInstance", new unregisterInstance());
+      processMap.put("updateInstance", new updateInstance());
+      return processMap;
+    }
+
+    public static class registerInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerInstance_args> {
+      public registerInstance() {
+        super("registerInstance");
+      }
+
+      public registerInstance_args getEmptyArgsInstance() {
+        return new registerInstance_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public registerInstance_result getResult(I iface, registerInstance_args args) throws org.apache.thrift.TException {
+        registerInstance_result result = new registerInstance_result();
+        try {
+          iface.registerInstance(args.projection, args.discoveryProjection, args.instance);
+        } catch (CuratorException ex1) {
+          result.ex1 = ex1;
+        }
+        return result;
+      }
+    }
+
+    public static class unregisterInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unregisterInstance_args> {
+      public unregisterInstance() {
+        super("unregisterInstance");
+      }
+
+      public unregisterInstance_args getEmptyArgsInstance() {
+        return new unregisterInstance_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public unregisterInstance_result getResult(I iface, unregisterInstance_args args) throws org.apache.thrift.TException {
+        unregisterInstance_result result = new unregisterInstance_result();
+        try {
+          iface.unregisterInstance(args.projection, args.discoveryProjection, args.instance);
+        } catch (CuratorException ex1) {
+          result.ex1 = ex1;
+        }
+        return result;
+      }
+    }
+
+    public static class updateInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateInstance_args> {
+      public updateInstance() {
+        super("updateInstance");
+      }
+
+      public updateInstance_args getEmptyArgsInstance() {
+        return new updateInstance_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public updateInstance_result getResult(I iface, updateInstance_args args) throws org.apache.thrift.TException {
+        updateInstance_result result = new updateInstance_result();
+        try {
+          iface.updateInstance(args.projection, args.discoveryProjection, args.instance);
+        } catch (CuratorException ex1) {
+          result.ex1 = ex1;
+        }
+        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<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      super(iface, getProcessMap(processMap));
+    }
+
+    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+      processMap.put("registerInstance", new registerInstance());
+      processMap.put("unregisterInstance", new unregisterInstance());
+      processMap.put("updateInstance", new updateInstance());
+      return processMap;
+    }
+
+    public static class registerInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerInstance_args, Void> {
+      public registerInstance() {
+        super("registerInstance");
+      }
+
+      public registerInstance_args getEmptyArgsInstance() {
+        return new registerInstance_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            registerInstance_result result = new registerInstance_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            registerInstance_result result = new registerInstance_result();
+            if (e instanceof CuratorException) {
+                        result.ex1 = (CuratorException) e;
+                        result.setEx1IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, registerInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.registerInstance(args.projection, args.discoveryProjection, args.instance,resultHandler);
+      }
+    }
+
+    public static class unregisterInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unregisterInstance_args, Void> {
+      public unregisterInstance() {
+        super("unregisterInstance");
+      }
+
+      public unregisterInstance_args getEmptyArgsInstance() {
+        return new unregisterInstance_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            unregisterInstance_result result = new unregisterInstance_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            unregisterInstance_result result = new unregisterInstance_result();
+            if (e instanceof CuratorException) {
+                        result.ex1 = (CuratorException) e;
+                        result.setEx1IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, unregisterInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.unregisterInstance(args.projection, args.discoveryProjection, args.instance,resultHandler);
+      }
+    }
+
+    public static class updateInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateInstance_args, Void> {
+      public updateInstance() {
+        super("updateInstance");
+      }
+
+      public updateInstance_args getEmptyArgsInstance() {
+        return new updateInstance_args();
+      }
+
+      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<Void>() { 
+          public void onComplete(Void o) {
+            updateInstance_result result = new updateInstance_result();
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            updateInstance_result result = new updateInstance_result();
+            if (e instanceof CuratorException) {
+                        result.ex1 = (CuratorException) e;
+                        result.setEx1IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, updateInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+        iface.updateInstance(args.projection, args.discoveryProjection, args.instance,resultHandler);
+      }
+    }
+
+  }
+
+  public static class registerInstance_args implements org.apache.thrift.TBase<registerInstance_args, registerInstance_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerInstance_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerInstance_args");
+
+    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("instance", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new registerInstance_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new registerInstance_argsTupleSchemeFactory());
+    }
+
+    public CuratorProjection projection; // required
+    public DiscoveryProjection discoveryProjection; // required
+    public DiscoveryInstance instance; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PROJECTION((short)1, "projection"),
+      DISCOVERY_PROJECTION((short)2, "discoveryProjection"),
+      INSTANCE((short)3, "instance");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PROJECTION
+            return PROJECTION;
+          case 2: // DISCOVERY_PROJECTION
+            return DISCOVERY_PROJECTION;
+          case 3: // INSTANCE
+            return INSTANCE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
+      tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class)));
+      tmpMap.put(_Fields.INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("instance", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerInstance_args.class, metaDataMap);
+    }
+
+    public registerInstance_args() {
+    }
+
+    public registerInstance_args(
+      CuratorProjection projection,
+      DiscoveryProjection discoveryProjection,
+      DiscoveryInstance instance)
+    {
+      this();
+      this.projection = projection;
+      this.discoveryProjection = discoveryProjection;
+      this.instance = instance;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public registerInstance_args(registerInstance_args other) {
+      if (other.isSetProjection()) {
+        this.projection = new CuratorProjection(other.projection);
+      }
+      if (other.isSetDiscoveryProjection()) {
+        this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection);
+      }
+      if (other.isSetInstance()) {
+        this.instance = new DiscoveryInstance(other.instance);
+      }
+    }
+
+    public registerInstance_args deepCopy() {
+      return new registerInstance_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.projection = null;
+      this.discoveryProjection = null;
+      this.instance = null;
+    }
+
+    public CuratorProjection getProjection() {
+      return this.projection;
+    }
+
+    public registerInstance_args setProjection(CuratorProjection projection) {
+      this.projection = projection;
+      return this;
+    }
+
+    public void unsetProjection() {
+      this.projection = null;
+    }
+
+    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
+    public boolean isSetProjection() {
+      return this.projection != null;
+    }
+
+    public void setProjectionIsSet(boolean value) {
+      if (!value) {
+        this.projection = null;
+      }
+    }
+
+    public DiscoveryProjection getDiscoveryProjection() {
+      return this.discoveryProjection;
+    }
+
+    public registerInstance_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) {
+      this.discoveryProjection = discoveryProjection;
+      return this;
+    }
+
+    public void unsetDiscoveryProjection() {
+      this.discoveryProjection = null;
+    }
+
+    /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */
+    public boolean isSetDiscoveryProjection() {
+      return this.discoveryProjection != null;
+    }
+
+    public void setDiscoveryProjectionIsSet(boolean value) {
+      if (!value) {
+        this.discoveryProjection = null;
+      }
+    }
+
+    public DiscoveryInstance getInstance() {
+      return this.instance;
+    }
+
+    public registerInstance_args setInstance(DiscoveryInstance instance) {
+      this.instance = instance;
+      return this;
+    }
+
+    public void unsetInstance() {
+      this.instance = null;
+    }
+
+    /** Returns true if field instance is set (has been assigned a value) and false otherwise */
+    public boolean isSetInstance() {
+      return this.instance != null;
+    }
+
+    public void setInstanceIsSet(boolean value) {
+      if (!value) {
+        this.instance = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PROJECTION:
+        if (value == null) {
+          unsetProjection();
+        } else {
+          setProjection((CuratorProjection)value);
+        }
+        break;
+
+      case DISCOVERY_PROJECTION:
+        if (value == null) {
+          unsetDiscoveryProjection();
+        } else {
+          setDiscoveryProjection((DiscoveryProjection)value);
+        }
+        break;
+
+      case INSTANCE:
+        if (value == null) {
+          unsetInstance();
+        } else {
+          setInstance((DiscoveryInstance)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PROJECTION:
+        return getProjection();
+
+      case DISCOVERY_PROJECTION:
+        return getDiscoveryProjection();
+
+      case INSTANCE:
+        return getInstance();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case PROJECTION:
+        return isSetProjection();
+      case DISCOVERY_PROJECTION:
+        return isSetDiscoveryProjection();
+      case INSTANCE:
+        return isSetInstance();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof registerInstance_args)
+        return this.equals((registerInstance_args)that);
+      return false;
+    }
+
+    public boolean equals(registerInstance_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_projection = true && this.isSetProjection();
+      boolean that_present_projection = true && that.isSetProjection();
+      if (this_present_projection || that_present_projection) {
+        if (!(this_present_projection && that_present_projection))
+          return false;
+        if (!this.projection.equals(that.projection))
+          return false;
+      }
+
+      boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection();
+      boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection();
+      if (this_present_discoveryProjection || that_present_discoveryProjection) {
+        if (!(this_present_discoveryProjection && that_present_discoveryProjection))
+          return false;
+        if (!this.discoveryProjection.equals(that.discoveryProjection))
+          return false;
+      }
+
+      boolean this_present_instance = true && this.isSetInstance();
+      boolean that_present_instance = true && that.isSetInstance();
+      if (this_present_instance || that_present_instance) {
+        if (!(this_present_instance && that_present_instance))
+          return false;
+        if (!this.instance.equals(that.instance))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(registerInstance_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetProjection()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetDiscoveryProjection()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetInstance()).compareTo(other.isSetInstance());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetInstance()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instance, other.instance);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("registerInstance_args(");
+      boolean first = true;
+
+      sb.append("projection:");
+      if (this.projection == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.projection);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("discoveryProjection:");
+      if (this.discoveryProjection == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.discoveryProjection);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("instance:");
+      if (this.instance == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.instance);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+      if (projection != null) {
+        projection.validate();
+      }
+      if (discoveryProjection != null) {
+        discoveryProjection.validate();
+      }
+      if (instance != null) {
+        instance.validate();
+      }
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class registerInstance_argsStandardSchemeFactory implements SchemeFactory {
+      public registerInstance_argsStandardScheme getScheme() {
+        return new registerInstance_argsStandardScheme();
+      }
+    }
+
+    private static class registerInstance_argsStandardScheme extends StandardScheme<registerInstance_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, registerInstance_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PROJECTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.projection = new CuratorProjection();
+                struct.projection.read(iprot);
+                struct.setProjectionIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // DISCOVERY_PROJECTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.discoveryProjection = new DiscoveryProjection();
+                struct.discoveryProjection.read(iprot);
+                struct.setDiscoveryProjectionIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // INSTANCE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.instance = new DiscoveryInstance();
+                struct.instance.read(iprot);
+                struct.setInstanceIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, registerInstance_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.projection != null) {
+          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
+          struct.projection.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.discoveryProjection != null) {
+          oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC);
+          struct.discoveryProjection.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.instance != null) {
+          oprot.writeFieldBegin(INSTANCE_FIELD_DESC);
+          struct.instance.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class registerInstance_argsTupleSchemeFactory implements SchemeFactory {
+      public registerInstance_argsTupleScheme getScheme() {
+        return new registerInstance_argsTupleScheme();
+      }
+    }
+
+    private static class registerInstance_argsTupleScheme extends TupleScheme<registerInstance_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, registerInstance_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetProjection()) {
+          optionals.set(0);
+        }
+        if (struct.isSetDiscoveryProjection()) {
+          optionals.set(1);
+        }
+        if (struct.isSetInstance()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetProjection()) {
+          struct.projection.write(oprot);
+        }
+        if (struct.isSetDiscoveryProjection()) {
+          struct.discoveryProjection.write(oprot);
+        }
+        if (struct.isSetInstance()) {
+          struct.instance.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, registerInstance_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(3);
+        if (incoming.get(0)) {
+          struct.projection = new CuratorProjection();
+          struct.projection.read(iprot);
+          struct.setProjectionIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.discoveryProjection = new DiscoveryProjection();
+          struct.discoveryProjection.read(iprot);
+          struct.setDiscoveryProjectionIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.instance = new DiscoveryInstance();
+          struct.instance.read(iprot);
+          struct.setInstanceIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class registerInstance_result implements org.apache.thrift.TBase<registerInstance_result, registerInstance_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerInstance_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerInstance_result");
+
+    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new registerInstance_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new registerInstance_resultTupleSchemeFactory());
+    }
+
+    public CuratorException ex1; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      EX1((short)1, "ex1");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // EX1
+            return EX1;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerInstance_result.class, metaDataMap);
+    }
+
+    public registerInstance_result() {
+    }
+
+    public registerInstance_result(
+      CuratorException ex1)
+    {
+      this();
+      this.ex1 = ex1;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public registerInstance_result(registerInstance_result other) {
+      if (other.isSetEx1()) {
+        this.ex1 = new CuratorException(other.ex1);
+      }
+    }
+
+    public registerInstance_result deepCopy() {
+      return new registerInstance_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.ex1 = null;
+    }
+
+    public CuratorException getEx1() {
+      return this.ex1;
+    }
+
+    public registerInstance_result setEx1(CuratorException ex1) {
+      this.ex1 = ex1;
+      return this;
+    }
+
+    public void unsetEx1() {
+      this.ex1 = null;
+    }
+
+    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
+    public boolean isSetEx1() {
+      return this.ex1 != null;
+    }
+
+    public void setEx1IsSet(boolean value) {
+      if (!value) {
+        this.ex1 = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case EX1:
+        if (value == null) {
+          unsetEx1();
+        } else {
+          setEx1((CuratorException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case EX1:
+        return getEx1();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case EX1:
+        return isSetEx1();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof registerInstance_result)
+        return this.equals((registerInstance_result)that);
+      return false;
+    }
+
+    public boolean equals(registerInstance_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ex1 = true && this.isSetEx1();
+      boolean that_present_ex1 = true && that.isSetEx1();
+      if (this_present_ex1 || that_present_ex1) {
+        if (!(this_present_ex1 && that_present_ex1))
+          return false;
+        if (!this.ex1.equals(that.ex1))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(registerInstance_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetEx1()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("registerInstance_result(");
+      boolean first = true;
+
+      sb.append("ex1:");
+      if (this.ex1 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ex1);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class registerInstance_resultStandardSchemeFactory implements SchemeFactory {
+      public registerInstance_resultStandardScheme getScheme() {
+        return new registerInstance_resultStandardScheme();
+      }
+    }
+
+    private static class registerInstance_resultStandardScheme extends StandardScheme<registerInstance_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, registerInstance_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // EX1
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex1 = new CuratorException();
+                struct.ex1.read(iprot);
+                struct.setEx1IsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, registerInstance_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.ex1 != null) {
+          oprot.writeFieldBegin(EX1_FIELD_DESC);
+          struct.ex1.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class registerInstance_resultTupleSchemeFactory implements SchemeFactory {
+      public registerInstance_resultTupleScheme getScheme() {
+        return new registerInstance_resultTupleScheme();
+      }
+    }
+
+    private static class registerInstance_resultTupleScheme extends TupleScheme<registerInstance_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, registerInstance_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetEx1()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetEx1()) {
+          struct.ex1.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, registerInstance_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.ex1 = new CuratorException();
+          struct.ex1.read(iprot);
+          struct.setEx1IsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class unregisterInstance_args implements org.apache.thrift.TBase<unregisterInstance_args, unregisterInstance_args._Fields>, java.io.Serializable, Cloneable, Comparable<unregisterInstance_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unregisterInstance_args");
+
+    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("instance", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new unregisterInstance_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new unregisterInstance_argsTupleSchemeFactory());
+    }
+
+    public CuratorProjection projection; // required
+    public DiscoveryProjection discoveryProjection; // required
+    public DiscoveryInstance instance; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      PROJECTION((short)1, "projection"),
+      DISCOVERY_PROJECTION((short)2, "discoveryProjection"),
+      INSTANCE((short)3, "instance");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // PROJECTION
+            return PROJECTION;
+          case 2: // DISCOVERY_PROJECTION
+            return DISCOVERY_PROJECTION;
+          case 3: // INSTANCE
+            return INSTANCE;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
+      tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class)));
+      tmpMap.put(_Fields.INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("instance", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unregisterInstance_args.class, metaDataMap);
+    }
+
+    public unregisterInstance_args() {
+    }
+
+    public unregisterInstance_args(
+      CuratorProjection projection,
+      DiscoveryProjection discoveryProjection,
+      DiscoveryInstance instance)
+    {
+      this();
+      this.projection = projection;
+      this.discoveryProjection = discoveryProjection;
+      this.instance = instance;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public unregisterInstance_args(unregisterInstance_args other) {
+      if (other.isSetProjection()) {
+        this.projection = new CuratorProjection(other.projection);
+      }
+      if (other.isSetDiscoveryProjection()) {
+        this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection);
+      }
+      if (other.isSetInstance()) {
+        this.instance = new DiscoveryInstance(other.instance);
+      }
+    }
+
+    public unregisterInstance_args deepCopy() {
+      return new unregisterInstance_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.projection = null;
+      this.discoveryProjection = null;
+      this.instance = null;
+    }
+
+    public CuratorProjection getProjection() {
+      return this.projection;
+    }
+
+    public unregisterInstance_args setProjection(CuratorProjection projection) {
+      this.projection = projection;
+      return this;
+    }
+
+    public void unsetProjection() {
+      this.projection = null;
+    }
+
+    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
+    public boolean isSetProjection() {
+      return this.projection != null;
+    }
+
+    public void setProjectionIsSet(boolean value) {
+      if (!value) {
+        this.projection = null;
+      }
+    }
+
+    public DiscoveryProjection getDiscoveryProjection() {
+      return this.discoveryProjection;
+    }
+
+    public unregisterInstance_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) {
+      this.discoveryProjection = discoveryProjection;
+      return this;
+    }
+
+    public void unsetDiscoveryProjection() {
+      this.discoveryProjection = null;
+    }
+
+    /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */
+    public boolean isSetDiscoveryProjection() {
+      return this.discoveryProjection != null;
+    }
+
+    public void setDiscoveryProjectionIsSet(boolean value) {
+      if (!value) {
+        this.discoveryProjection = null;
+      }
+    }
+
+    public DiscoveryInstance getInstance() {
+      return this.instance;
+    }
+
+    public unregisterInstance_args setInstance(DiscoveryInstance instance) {
+      this.instance = instance;
+      return this;
+    }
+
+    public void unsetInstance() {
+      this.instance = null;
+    }
+
+    /** Returns true if field instance is set (has been assigned a value) and false otherwise */
+    public boolean isSetInstance() {
+      return this.instance != null;
+    }
+
+    public void setInstanceIsSet(boolean value) {
+      if (!value) {
+        this.instance = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case PROJECTION:
+        if (value == null) {
+          unsetProjection();
+        } else {
+          setProjection((CuratorProjection)value);
+        }
+        break;
+
+      case DISCOVERY_PROJECTION:
+        if (value == null) {
+          unsetDiscoveryProjection();
+        } else {
+          setDiscoveryProjection((DiscoveryProjection)value);
+        }
+        break;
+
+      case INSTANCE:
+        if (value == null) {
+          unsetInstance();
+        } else {
+          setInstance((DiscoveryInstance)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PROJECTION:
+        return getProjection();
+
+      case DISCOVERY_PROJECTION:
+        return getDiscoveryProjection();
+
+      case INSTANCE:
+        return getInstance();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case PROJECTION:
+        return isSetProjection();
+      case DISCOVERY_PROJECTION:
+        return isSetDiscoveryProjection();
+      case INSTANCE:
+        return isSetInstance();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof unregisterInstance_args)
+        return this.equals((unregisterInstance_args)that);
+      return false;
+    }
+
+    public boolean equals(unregisterInstance_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_projection = true && this.isSetProjection();
+      boolean that_present_projection = true && that.isSetProjection();
+      if (this_present_projection || that_present_projection) {
+        if (!(this_present_projection && that_present_projection))
+          return false;
+        if (!this.projection.equals(that.projection))
+          return false;
+      }
+
+      boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection();
+      boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection();
+      if (this_present_discoveryProjection || that_present_discoveryProjection) {
+        if (!(this_present_discoveryProjection && that_present_discoveryProjection))
+          return false;
+        if (!this.discoveryProjection.equals(that.discoveryProjection))
+          return false;
+      }
+
+      boolean this_present_instance = true && this.isSetInstance();
+      boolean that_present_instance = true && that.isSetInstance();
+      if (this_present_instance || that_present_instance) {
+        if (!(this_present_instance && that_present_instance))
+          return false;
+        if (!this.instance.equals(that.instance))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(unregisterInstance_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetProjection()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetDiscoveryProjection()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetInstance()).compareTo(other.isSetInstance());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetInstance()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instance, other.instance);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("unregisterInstance_args(");
+      boolean first = true;
+
+      sb.append("projection:");
+      if (this.projection == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.projection);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("discoveryProjection:");
+      if (this.discoveryProjection == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.discoveryProjection);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("instance:");
+      if (this.instance == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.instance);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+      if (projection != null) {
+        projection.validate();
+      }
+      if (discoveryProjection != null) {
+        discoveryProjection.validate();
+      }
+      if (instance != null) {
+        instance.validate();
+      }
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class unregisterInstance_argsStandardSchemeFactory implements SchemeFactory {
+      public unregisterInstance_argsStandardScheme getScheme() {
+        return new unregisterInstance_argsStandardScheme();
+      }
+    }
+
+    private static class unregisterInstance_argsStandardScheme extends StandardScheme<unregisterInstance_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, unregisterInstance_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // PROJECTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.projection = new CuratorProjection();
+                struct.projection.read(iprot);
+                struct.setProjectionIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 2: // DISCOVERY_PROJECTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.discoveryProjection = new DiscoveryProjection();
+                struct.discoveryProjection.read(iprot);
+                struct.setDiscoveryProjectionIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 3: // INSTANCE
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.instance = new DiscoveryInstance();
+                struct.instance.read(iprot);
+                struct.setInstanceIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+          }
+          iprot.readFieldEnd();
+        }
+        iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked in the validate method
+        struct.validate();
+      }
+
+      public void write(org.apache.thrift.protocol.TProtocol oprot, unregisterInstance_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.projection != null) {
+          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
+          struct.projection.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.discoveryProjection != null) {
+          oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC);
+          struct.discoveryProjection.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.instance != null) {
+          oprot.writeFieldBegin(INSTANCE_FIELD_DESC);
+          struct.instance.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class unregisterInstance_argsTupleSchemeFactory implements SchemeFactory {
+      public unregisterInstance_argsTupleScheme getScheme() {
+        return new unregisterInstance_argsTupleScheme();
+      }
+    }
+
+    private static class unregisterInstance_argsTupleScheme extends TupleScheme<unregisterInstance_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, unregisterInstance_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetProjection()) {
+          optionals.set(0);
+        }
+        if (struct.isSetDiscoveryProjection()) {
+          optionals.set(1);
+        }
+        if (struct.isSetInstance()) {
+          optionals.set(2);
+        }
+        oprot.writeBitSet(optionals, 3);
+        if (struct.isSetProjection()) {
+          struct.projection.write(oprot);
+        }
+        if (struct.isSetDiscoveryProjection()) {
+          struct.discoveryProjection.write(oprot);
+        }
+        if (struct.isSetInstance()) {
+          struct.instance.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, unregisterInstance_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(3);
+        if (incoming.get(0)) {
+          struct.projection = new CuratorProjection();
+          struct.projection.read(iprot);
+          struct.setProjectionIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.discoveryProjection = new DiscoveryProjection();
+          struct.discoveryProjection.read(iprot);
+          struct.setDiscoveryProjectionIsSet(true);
+        }
+        if (incoming.get(2)) {
+          struct.instance = new DiscoveryInstance();
+          struct.instance.read(iprot);
+          struct.setInstanceIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class unregisterInstance_result implements org.apache.thrift.TBase<unregisterInstance_result, unregisterInstance_result._Fields>, java.io.Serializable, Cloneable, Comparable<unregisterInstance_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unregisterInstance_result");
+
+    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new unregisterInstance_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new unregisterInstance_resultTupleSchemeFactory());
+    }
+
+    public CuratorException ex1; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      EX1((short)1, "ex1");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // EX1
+            return EX1;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unregisterInstance_result.class, metaDataMap);
+    }
+
+    public unregisterInstance_result() {
+    }
+
+    public unregisterInstance_result(
+      CuratorException ex1)
+    {
+      this();
+      this.ex1 = ex1;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public unregisterInstance_result(unregisterInstance_result other) {
+      if (other.isSetEx1()) {
+        this.ex1 = new CuratorException(other.ex1);
+      }
+    }
+
+    public unregisterInstance_result deepCopy() {
+      return new unregisterInstance_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.ex1 = null;
+    }
+
+    public CuratorException getEx1() {
+      return this.ex1;
+    }
+
+    public unregisterInstance_result setEx1(CuratorException ex1) {
+      this.ex1 = ex1;
+      return this;
+    }
+
+    public void unsetEx1() {
+      this.ex1 = null;
+    }
+
+    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
+    public boolean isSetEx1() {
+      return this.ex1 != null;
+    }
+
+    public void setEx1IsSet(boolean value) {
+      if (!value) {
+        this.ex1 = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case EX1:
+        if (value == null) {
+          unsetEx1();
+        } else {
+          setEx1((CuratorException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case EX1:
+        return getEx1();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case EX1:
+        return isSetEx1();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof unregisterInstance_result)
+        return this.equals((unregisterInstance_result)that);
+      return false;
+    }
+
+    public boolean equals(unregisterInstance_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_ex1 = true && this.isSetEx1();
+      boolean that_present_ex1 = true && that.isSetEx1();
+      if (this_present_ex1 || that_present_ex1) {
+        if (!(this_present_ex1 && that_present_ex1))
+          return false;
+        if (!this.ex1.equals(that.ex1))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(unregisterInstance_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetEx1()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+      }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("unregisterInstance_result(");
+      boolean first = true;
+
+      sb.append("ex1:");
+      if (this.ex1 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ex1);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+      // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private static class unregisterInstance_resultStandardSchemeFactory implements SchemeFactory {
+      public unregisterInstance_resultStandardScheme getScheme() {
+        return new unregisterInstance_resultStandardScheme();
+      }
+    }
+
+    private static class unregisterInstance_resultStandardScheme extends StandardScheme<unregisterInstance_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, unregisterInstance_result struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // EX1
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex1 = new CuratorException();
+                struct.ex1.read(iprot);
+                struct.setEx1IsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            default:
+              org.apache.thrift.

<TRUNCATED>

Mime
View raw message