curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [6/7] wip on service discovery
Date Fri, 30 May 2014 22:23:45 GMT
http://git-wip-us.apache.org/repos/asf/curator/blob/b79909a4/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
index a082b33..169192e 100644
--- 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
@@ -36,6 +36,12 @@ public class DiscoveryServiceLowLevel {
 
   public interface Iface {
 
+    public DiscoveryInstance queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws CuratorException, org.apache.thrift.TException;
+
+    public List<DiscoveryInstance> queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws CuratorException, org.apache.thrift.TException;
+
+    public List<String> queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws CuratorException, org.apache.thrift.TException;
+
     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;
@@ -46,6 +52,12 @@ public class DiscoveryServiceLowLevel {
 
   public interface AsyncIface {
 
+    public void queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     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;
@@ -74,6 +86,90 @@ public class DiscoveryServiceLowLevel {
       super(iprot, oprot);
     }
 
+    public DiscoveryInstance queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws CuratorException, org.apache.thrift.TException
+    {
+      send_queryForInstance(projection, discoveryProjection, name, id);
+      return recv_queryForInstance();
+    }
+
+    public void send_queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws org.apache.thrift.TException
+    {
+      queryForInstance_args args = new queryForInstance_args();
+      args.setProjection(projection);
+      args.setDiscoveryProjection(discoveryProjection);
+      args.setName(name);
+      args.setId(id);
+      sendBase("queryForInstance", args);
+    }
+
+    public DiscoveryInstance recv_queryForInstance() throws CuratorException, org.apache.thrift.TException
+    {
+      queryForInstance_result result = new queryForInstance_result();
+      receiveBase(result, "queryForInstance");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ex1 != null) {
+        throw result.ex1;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryForInstance failed: unknown result");
+    }
+
+    public List<DiscoveryInstance> queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws CuratorException, org.apache.thrift.TException
+    {
+      send_queryForInstances(projection, discoveryProjection, name);
+      return recv_queryForInstances();
+    }
+
+    public void send_queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws org.apache.thrift.TException
+    {
+      queryForInstances_args args = new queryForInstances_args();
+      args.setProjection(projection);
+      args.setDiscoveryProjection(discoveryProjection);
+      args.setName(name);
+      sendBase("queryForInstances", args);
+    }
+
+    public List<DiscoveryInstance> recv_queryForInstances() throws CuratorException, org.apache.thrift.TException
+    {
+      queryForInstances_result result = new queryForInstances_result();
+      receiveBase(result, "queryForInstances");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ex1 != null) {
+        throw result.ex1;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryForInstances failed: unknown result");
+    }
+
+    public List<String> queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws CuratorException, org.apache.thrift.TException
+    {
+      send_queryForNames(projection, discoveryProjection);
+      return recv_queryForNames();
+    }
+
+    public void send_queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws org.apache.thrift.TException
+    {
+      queryForNames_args args = new queryForNames_args();
+      args.setProjection(projection);
+      args.setDiscoveryProjection(discoveryProjection);
+      sendBase("queryForNames", args);
+    }
+
+    public List<String> recv_queryForNames() throws CuratorException, org.apache.thrift.TException
+    {
+      queryForNames_result result = new queryForNames_result();
+      receiveBase(result, "queryForNames");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ex1 != null) {
+        throw result.ex1;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryForNames failed: unknown result");
+    }
+
     public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException
     {
       send_registerInstance(projection, discoveryProjection, instance);
@@ -167,6 +263,120 @@ public class DiscoveryServiceLowLevel {
       super(protocolFactory, clientManager, transport);
     }
 
+    public void queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      queryForInstance_call method_call = new queryForInstance_call(projection, discoveryProjection, name, id, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class queryForInstance_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private CuratorProjection projection;
+      private DiscoveryProjection discoveryProjection;
+      private String name;
+      private String id;
+      public queryForInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id, 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.name = name;
+        this.id = id;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryForInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        queryForInstance_args args = new queryForInstance_args();
+        args.setProjection(projection);
+        args.setDiscoveryProjection(discoveryProjection);
+        args.setName(name);
+        args.setId(id);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public DiscoveryInstance 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);
+        return (new Client(prot)).recv_queryForInstance();
+      }
+    }
+
+    public void queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      queryForInstances_call method_call = new queryForInstances_call(projection, discoveryProjection, name, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class queryForInstances_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private CuratorProjection projection;
+      private DiscoveryProjection discoveryProjection;
+      private String name;
+      public queryForInstances_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, 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.name = name;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryForInstances", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        queryForInstances_args args = new queryForInstances_args();
+        args.setProjection(projection);
+        args.setDiscoveryProjection(discoveryProjection);
+        args.setName(name);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<DiscoveryInstance> 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);
+        return (new Client(prot)).recv_queryForInstances();
+      }
+    }
+
+    public void queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      queryForNames_call method_call = new queryForNames_call(projection, discoveryProjection, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class queryForNames_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private CuratorProjection projection;
+      private DiscoveryProjection discoveryProjection;
+      public queryForNames_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, 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;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryForNames", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        queryForNames_args args = new queryForNames_args();
+        args.setProjection(projection);
+        args.setDiscoveryProjection(discoveryProjection);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<String> 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);
+        return (new Client(prot)).recv_queryForNames();
+      }
+    }
+
     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);
@@ -294,12 +504,87 @@ public class DiscoveryServiceLowLevel {
     }
 
     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("queryForInstance", new queryForInstance());
+      processMap.put("queryForInstances", new queryForInstances());
+      processMap.put("queryForNames", new queryForNames());
       processMap.put("registerInstance", new registerInstance());
       processMap.put("unregisterInstance", new unregisterInstance());
       processMap.put("updateInstance", new updateInstance());
       return processMap;
     }
 
+    public static class queryForInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, queryForInstance_args> {
+      public queryForInstance() {
+        super("queryForInstance");
+      }
+
+      public queryForInstance_args getEmptyArgsInstance() {
+        return new queryForInstance_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public queryForInstance_result getResult(I iface, queryForInstance_args args) throws org.apache.thrift.TException {
+        queryForInstance_result result = new queryForInstance_result();
+        try {
+          result.success = iface.queryForInstance(args.projection, args.discoveryProjection, args.name, args.id);
+        } catch (CuratorException ex1) {
+          result.ex1 = ex1;
+        }
+        return result;
+      }
+    }
+
+    public static class queryForInstances<I extends Iface> extends org.apache.thrift.ProcessFunction<I, queryForInstances_args> {
+      public queryForInstances() {
+        super("queryForInstances");
+      }
+
+      public queryForInstances_args getEmptyArgsInstance() {
+        return new queryForInstances_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public queryForInstances_result getResult(I iface, queryForInstances_args args) throws org.apache.thrift.TException {
+        queryForInstances_result result = new queryForInstances_result();
+        try {
+          result.success = iface.queryForInstances(args.projection, args.discoveryProjection, args.name);
+        } catch (CuratorException ex1) {
+          result.ex1 = ex1;
+        }
+        return result;
+      }
+    }
+
+    public static class queryForNames<I extends Iface> extends org.apache.thrift.ProcessFunction<I, queryForNames_args> {
+      public queryForNames() {
+        super("queryForNames");
+      }
+
+      public queryForNames_args getEmptyArgsInstance() {
+        return new queryForNames_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public queryForNames_result getResult(I iface, queryForNames_args args) throws org.apache.thrift.TException {
+        queryForNames_result result = new queryForNames_result();
+        try {
+          result.success = iface.queryForNames(args.projection, args.discoveryProjection);
+        } catch (CuratorException ex1) {
+          result.ex1 = ex1;
+        }
+        return result;
+      }
+    }
+
     public static class registerInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerInstance_args> {
       public registerInstance() {
         super("registerInstance");
@@ -385,26 +670,30 @@ public class DiscoveryServiceLowLevel {
     }
 
     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("queryForInstance", new queryForInstance());
+      processMap.put("queryForInstances", new queryForInstances());
+      processMap.put("queryForNames", new queryForNames());
       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 static class queryForInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, queryForInstance_args, DiscoveryInstance> {
+      public queryForInstance() {
+        super("queryForInstance");
       }
 
-      public registerInstance_args getEmptyArgsInstance() {
-        return new registerInstance_args();
+      public queryForInstance_args getEmptyArgsInstance() {
+        return new queryForInstance_args();
       }
 
-      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<DiscoveryInstance> 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();
+        return new AsyncMethodCallback<DiscoveryInstance>() { 
+          public void onComplete(DiscoveryInstance o) {
+            queryForInstance_result result = new queryForInstance_result();
+            result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -416,7 +705,7 @@ public class DiscoveryServiceLowLevel {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            registerInstance_result result = new registerInstance_result();
+            queryForInstance_result result = new queryForInstance_result();
             if (e instanceof CuratorException) {
                         result.ex1 = (CuratorException) e;
                         result.setEx1IsSet(true);
@@ -442,25 +731,26 @@ public class DiscoveryServiceLowLevel {
         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 void start(I iface, queryForInstance_args args, org.apache.thrift.async.AsyncMethodCallback<DiscoveryInstance> resultHandler) throws TException {
+        iface.queryForInstance(args.projection, args.discoveryProjection, args.name, args.id,resultHandler);
       }
     }
 
-    public static class unregisterInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unregisterInstance_args, Void> {
-      public unregisterInstance() {
-        super("unregisterInstance");
+    public static class queryForInstances<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, queryForInstances_args, List<DiscoveryInstance>> {
+      public queryForInstances() {
+        super("queryForInstances");
       }
 
-      public unregisterInstance_args getEmptyArgsInstance() {
-        return new unregisterInstance_args();
+      public queryForInstances_args getEmptyArgsInstance() {
+        return new queryForInstances_args();
       }
 
-      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<DiscoveryInstance>> 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();
+        return new AsyncMethodCallback<List<DiscoveryInstance>>() { 
+          public void onComplete(List<DiscoveryInstance> o) {
+            queryForInstances_result result = new queryForInstances_result();
+            result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -472,7 +762,7 @@ public class DiscoveryServiceLowLevel {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            unregisterInstance_result result = new unregisterInstance_result();
+            queryForInstances_result result = new queryForInstances_result();
             if (e instanceof CuratorException) {
                         result.ex1 = (CuratorException) e;
                         result.setEx1IsSet(true);
@@ -498,25 +788,26 @@ public class DiscoveryServiceLowLevel {
         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 void start(I iface, queryForInstances_args args, org.apache.thrift.async.AsyncMethodCallback<List<DiscoveryInstance>> resultHandler) throws TException {
+        iface.queryForInstances(args.projection, args.discoveryProjection, args.name,resultHandler);
       }
     }
 
-    public static class updateInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateInstance_args, Void> {
-      public updateInstance() {
-        super("updateInstance");
+    public static class queryForNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, queryForNames_args, List<String>> {
+      public queryForNames() {
+        super("queryForNames");
       }
 
-      public updateInstance_args getEmptyArgsInstance() {
-        return new updateInstance_args();
+      public queryForNames_args getEmptyArgsInstance() {
+        return new queryForNames_args();
       }
 
-      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<List<String>> 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();
+        return new AsyncMethodCallback<List<String>>() { 
+          public void onComplete(List<String> o) {
+            queryForNames_result result = new queryForNames_result();
+            result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
               return;
@@ -528,7 +819,7 @@ public class DiscoveryServiceLowLevel {
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            updateInstance_result result = new updateInstance_result();
+            queryForNames_result result = new queryForNames_result();
             if (e instanceof CuratorException) {
                         result.ex1 = (CuratorException) e;
                         result.setEx1IsSet(true);
@@ -554,8 +845,3344 @@ public class DiscoveryServiceLowLevel {
         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 void start(I iface, queryForNames_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
+        iface.queryForNames(args.projection, args.discoveryProjection,resultHandler);
+      }
+    }
+
+    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 queryForInstance_args implements org.apache.thrift.TBase<queryForInstance_args, queryForInstance_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryForInstance_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstance_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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new queryForInstance_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new queryForInstance_argsTupleSchemeFactory());
+    }
+
+    public CuratorProjection projection; // required
+    public DiscoveryProjection discoveryProjection; // required
+    public String name; // required
+    public String id; // 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"),
+      NAME((short)3, "name"),
+      ID((short)4, "id");
+
+      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: // NAME
+            return NAME;
+          case 4: // ID
+            return ID;
+          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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForInstance_args.class, metaDataMap);
+    }
+
+    public queryForInstance_args() {
+    }
+
+    public queryForInstance_args(
+      CuratorProjection projection,
+      DiscoveryProjection discoveryProjection,
+      String name,
+      String id)
+    {
+      this();
+      this.projection = projection;
+      this.discoveryProjection = discoveryProjection;
+      this.name = name;
+      this.id = id;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public queryForInstance_args(queryForInstance_args other) {
+      if (other.isSetProjection()) {
+        this.projection = new CuratorProjection(other.projection);
+      }
+      if (other.isSetDiscoveryProjection()) {
+        this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection);
+      }
+      if (other.isSetName()) {
+        this.name = other.name;
+      }
+      if (other.isSetId()) {
+        this.id = other.id;
+      }
+    }
+
+    public queryForInstance_args deepCopy() {
+      return new queryForInstance_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.projection = null;
+      this.discoveryProjection = null;
+      this.name = null;
+      this.id = null;
+    }
+
+    public CuratorProjection getProjection() {
+      return this.projection;
+    }
+
+    public queryForInstance_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 queryForInstance_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 String getName() {
+      return this.name;
+    }
+
+    public queryForInstance_args setName(String name) {
+      this.name = name;
+      return this;
+    }
+
+    public void unsetName() {
+      this.name = null;
+    }
+
+    /** Returns true if field name is set (has been assigned a value) and false otherwise */
+    public boolean isSetName() {
+      return this.name != null;
+    }
+
+    public void setNameIsSet(boolean value) {
+      if (!value) {
+        this.name = null;
+      }
+    }
+
+    public String getId() {
+      return this.id;
+    }
+
+    public queryForInstance_args setId(String id) {
+      this.id = id;
+      return this;
+    }
+
+    public void unsetId() {
+      this.id = null;
+    }
+
+    /** Returns true if field id is set (has been assigned a value) and false otherwise */
+    public boolean isSetId() {
+      return this.id != null;
+    }
+
+    public void setIdIsSet(boolean value) {
+      if (!value) {
+        this.id = 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 NAME:
+        if (value == null) {
+          unsetName();
+        } else {
+          setName((String)value);
+        }
+        break;
+
+      case ID:
+        if (value == null) {
+          unsetId();
+        } else {
+          setId((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PROJECTION:
+        return getProjection();
+
+      case DISCOVERY_PROJECTION:
+        return getDiscoveryProjection();
+
+      case NAME:
+        return getName();
+
+      case ID:
+        return getId();
+
+      }
+      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 NAME:
+        return isSetName();
+      case ID:
+        return isSetId();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof queryForInstance_args)
+        return this.equals((queryForInstance_args)that);
+      return false;
+    }
+
+    public boolean equals(queryForInstance_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_name = true && this.isSetName();
+      boolean that_present_name = true && that.isSetName();
+      if (this_present_name || that_present_name) {
+        if (!(this_present_name && that_present_name))
+          return false;
+        if (!this.name.equals(that.name))
+          return false;
+      }
+
+      boolean this_present_id = true && this.isSetId();
+      boolean that_present_id = true && that.isSetId();
+      if (this_present_id || that_present_id) {
+        if (!(this_present_id && that_present_id))
+          return false;
+        if (!this.id.equals(that.id))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(queryForInstance_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(isSetName()).compareTo(other.isSetName());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetName()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
+        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("queryForInstance_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("name:");
+      if (this.name == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.name);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("id:");
+      if (this.id == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.id);
+      }
+      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();
+      }
+    }
+
+    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 queryForInstance_argsStandardSchemeFactory implements SchemeFactory {
+      public queryForInstance_argsStandardScheme getScheme() {
+        return new queryForInstance_argsStandardScheme();
+      }
+    }
+
+    private static class queryForInstance_argsStandardScheme extends StandardScheme<queryForInstance_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstance_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: // NAME
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.name = iprot.readString();
+                struct.setNameIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 4: // ID
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.id = iprot.readString();
+                struct.setIdIsSet(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, queryForInstance_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.name != null) {
+          oprot.writeFieldBegin(NAME_FIELD_DESC);
+          oprot.writeString(struct.name);
+          oprot.writeFieldEnd();
+        }
+        if (struct.id != null) {
+          oprot.writeFieldBegin(ID_FIELD_DESC);
+          oprot.writeString(struct.id);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class queryForInstance_argsTupleSchemeFactory implements SchemeFactory {
+      public queryForInstance_argsTupleScheme getScheme() {
+        return new queryForInstance_argsTupleScheme();
+      }
+    }
+
+    private static class queryForInstance_argsTupleScheme extends TupleScheme<queryForInstance_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, queryForInstance_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.isSetName()) {
+          optionals.set(2);
+        }
+        if (struct.isSetId()) {
+          optionals.set(3);
+        }
+        oprot.writeBitSet(optionals, 4);
+        if (struct.isSetProjection()) {
+          struct.projection.write(oprot);
+        }
+        if (struct.isSetDiscoveryProjection()) {
+          struct.discoveryProjection.write(oprot);
+        }
+        if (struct.isSetName()) {
+          oprot.writeString(struct.name);
+        }
+        if (struct.isSetId()) {
+          oprot.writeString(struct.id);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, queryForInstance_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(4);
+        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.name = iprot.readString();
+          struct.setNameIsSet(true);
+        }
+        if (incoming.get(3)) {
+          struct.id = iprot.readString();
+          struct.setIdIsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class queryForInstance_result implements org.apache.thrift.TBase<queryForInstance_result, queryForInstance_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryForInstance_result>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstance_result");
+
+    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+    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 queryForInstance_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new queryForInstance_resultTupleSchemeFactory());
+    }
+
+    public DiscoveryInstance success; // required
+    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 {
+      SUCCESS((short)0, "success"),
+      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 0: // SUCCESS
+            return SUCCESS;
+          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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.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(queryForInstance_result.class, metaDataMap);
+    }
+
+    public queryForInstance_result() {
+    }
+
+    public queryForInstance_result(
+      DiscoveryInstance success,
+      CuratorException ex1)
+    {
+      this();
+      this.success = success;
+      this.ex1 = ex1;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public queryForInstance_result(queryForInstance_result other) {
+      if (other.isSetSuccess()) {
+        this.success = new DiscoveryInstance(other.success);
+      }
+      if (other.isSetEx1()) {
+        this.ex1 = new CuratorException(other.ex1);
+      }
+    }
+
+    public queryForInstance_result deepCopy() {
+      return new queryForInstance_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.success = null;
+      this.ex1 = null;
+    }
+
+    public DiscoveryInstance getSuccess() {
+      return this.success;
+    }
+
+    public queryForInstance_result setSuccess(DiscoveryInstance success) {
+      this.success = success;
+      return this;
+    }
+
+    public void unsetSuccess() {
+      this.success = null;
+    }
+
+    /** Returns true if field success is set (has been assigned a value) and false otherwise */
+    public boolean isSetSuccess() {
+      return this.success != null;
+    }
+
+    public void setSuccessIsSet(boolean value) {
+      if (!value) {
+        this.success = null;
+      }
+    }
+
+    public CuratorException getEx1() {
+      return this.ex1;
+    }
+
+    public queryForInstance_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 SUCCESS:
+        if (value == null) {
+          unsetSuccess();
+        } else {
+          setSuccess((DiscoveryInstance)value);
+        }
+        break;
+
+      case EX1:
+        if (value == null) {
+          unsetEx1();
+        } else {
+          setEx1((CuratorException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SUCCESS:
+        return getSuccess();
+
+      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 SUCCESS:
+        return isSetSuccess();
+      case EX1:
+        return isSetEx1();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof queryForInstance_result)
+        return this.equals((queryForInstance_result)that);
+      return false;
+    }
+
+    public boolean equals(queryForInstance_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_success = true && this.isSetSuccess();
+      boolean that_present_success = true && that.isSetSuccess();
+      if (this_present_success || that_present_success) {
+        if (!(this_present_success && that_present_success))
+          return false;
+        if (!this.success.equals(that.success))
+          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(queryForInstance_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSuccess()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      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("queryForInstance_result(");
+      boolean first = true;
+
+      sb.append("success:");
+      if (this.success == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.success);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      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
+      if (success != null) {
+        success.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 queryForInstance_resultStandardSchemeFactory implements SchemeFactory {
+      public queryForInstance_resultStandardScheme getScheme() {
+        return new queryForInstance_resultStandardScheme();
+      }
+    }
+
+    private static class queryForInstance_resultStandardScheme extends StandardScheme<queryForInstance_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstance_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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.success = new DiscoveryInstance();
+                struct.success.read(iprot);
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            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, queryForInstance_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          struct.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ex1 != null) {
+          oprot.writeFieldBegin(EX1_FIELD_DESC);
+          struct.ex1.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class queryForInstance_resultTupleSchemeFactory implements SchemeFactory {
+      public queryForInstance_resultTupleScheme getScheme() {
+        return new queryForInstance_resultTupleScheme();
+      }
+    }
+
+    private static class queryForInstance_resultTupleScheme extends TupleScheme<queryForInstance_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, queryForInstance_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetEx1()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          struct.success.write(oprot);
+        }
+        if (struct.isSetEx1()) {
+          struct.ex1.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, queryForInstance_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.success = new DiscoveryInstance();
+          struct.success.read(iprot);
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.ex1 = new CuratorException();
+          struct.ex1.read(iprot);
+          struct.setEx1IsSet(true);
+        }
+      }
+    }
+
+  }
+
+  public static class queryForInstances_args implements org.apache.thrift.TBase<queryForInstances_args, queryForInstances_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryForInstances_args>   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstances_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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new queryForInstances_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new queryForInstances_argsTupleSchemeFactory());
+    }
+
+    public CuratorProjection projection; // required
+    public DiscoveryProjection discoveryProjection; // required
+    public String name; // 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"),
+      NAME((short)3, "name");
+
+      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: // NAME
+            return NAME;
+          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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForInstances_args.class, metaDataMap);
+    }
+
+    public queryForInstances_args() {
+    }
+
+    public queryForInstances_args(
+      CuratorProjection projection,
+      DiscoveryProjection discoveryProjection,
+      String name)
+    {
+      this();
+      this.projection = projection;
+      this.discoveryProjection = discoveryProjection;
+      this.name = name;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public queryForInstances_args(queryForInstances_args other) {
+      if (other.isSetProjection()) {
+        this.projection = new CuratorProjection(other.projection);
+      }
+      if (other.isSetDiscoveryProjection()) {
+        this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection);
+      }
+      if (other.isSetName()) {
+        this.name = other.name;
+      }
+    }
+
+    public queryForInstances_args deepCopy() {
+      return new queryForInstances_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.projection = null;
+      this.discoveryProjection = null;
+      this.name = null;
+    }
+
+    public CuratorProjection getProjection() {
+      return this.projection;
+    }
+
+    public queryForInstances_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 queryForInstances_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 String getName() {
+      return this.name;
+    }
+
+    public queryForInstances_args setName(String name) {
+      this.name = name;
+      return this;
+    }
+
+    public void unsetName() {
+      this.name = null;
+    }
+
+    /** Returns true if field name is set (has been assigned a value) and false otherwise */
+    public boolean isSetName() {
+      return this.name != null;
+    }
+
+    public void setNameIsSet(boolean value) {
+      if (!value) {
+        this.name = 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 NAME:
+        if (value == null) {
+          unsetName();
+        } else {
+          setName((String)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case PROJECTION:
+        return getProjection();
+
+      case DISCOVERY_PROJECTION:
+        return getDiscoveryProjection();
+
+      case NAME:
+        return getName();
+
+      }
+      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 NAME:
+        return isSetName();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof queryForInstances_args)
+        return this.equals((queryForInstances_args)that);
+      return false;
+    }
+
+    public boolean equals(queryForInstances_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_name = true && this.isSetName();
+      boolean that_present_name = true && that.isSetName();
+      if (this_present_name || that_present_name) {
+        if (!(this_present_name && that_present_name))
+          return false;
+        if (!this.name.equals(that.name))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    @Override
+    public int compareTo(queryForInstances_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(isSetName()).compareTo(other.isSetName());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetName()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+        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("queryForInstances_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("name:");
+      if (this.name == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.name);
+      }
+      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();
+      }
+    }
+
+    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 queryForInstances_argsStandardSchemeFactory implements SchemeFactory {
+      public queryForInstances_argsStandardScheme getScheme() {
+        return new queryForInstances_argsStandardScheme();
+      }
+    }
+
+    private static class queryForInstances_argsStandardScheme extends StandardScheme<queryForInstances_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstances_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: // NAME
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.name = iprot.readString();
+                struct.setNameIsSet(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, queryForInstances_args struct) t

<TRUNCATED>

Mime
View raw message