curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/2] git commit: refactoring
Date Fri, 30 May 2014 02:11:51 GMT
Repository: curator
Updated Branches:
  refs/heads/curator-rpc 985c9ed00 -> cbd174a69


refactoring


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/6e9fa2a4
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/6e9fa2a4
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/6e9fa2a4

Branch: refs/heads/curator-rpc
Commit: 6e9fa2a4bac892c42ed85d1af658c5aff41ffbed
Parents: 985c9ed
Author: randgalt <randgalt@apache.org>
Authored: Thu May 29 20:56:38 2014 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Thu May 29 20:56:38 2014 -0500

----------------------------------------------------------------------
 .../projection/CuratorProjectionService.java    |  27 +-
 .../x/rpc/idl/projection/LeaderProjection.java  |   6 +-
 .../x/rpc/idl/projection/LockProjection.java    |  20 +
 .../rpc/idl/projection/NodeCacheProjection.java |   6 +-
 .../projection/PathChildrenCacheProjection.java |   6 +-
 curator-x-rpc/src/main/thrift/curator.thrift    |  14 +-
 .../curator/generated/CuratorService.java       | 175 ++++-----
 .../curator/generated/LeaderProjection.java     | 111 +++---
 .../curator/generated/LockProjection.java       | 388 +++++++++++++++++++
 .../curator/generated/NodeCacheProjection.java  | 111 +++---
 .../generated/PathChildrenCacheProjection.java  | 111 +++---
 .../org/apache/curator/x/rpc/TestClient.java    |   6 +-
 12 files changed, 686 insertions(+), 295 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/CuratorProjectionService.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/CuratorProjectionService.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/CuratorProjectionService.java
index a870447..c82ad5c 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/CuratorProjectionService.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/CuratorProjectionService.java
@@ -257,20 +257,20 @@ public class CuratorProjectionService
     }
 
     @ThriftMethod
-    public boolean closeGenericProjection(CuratorProjection curatorProjection, GenericProjection genericProjection) throws Exception
+    public boolean closeGenericProjection(CuratorProjection curatorProjection, String id) throws Exception
     {
         CuratorEntry entry = getEntry(curatorProjection);
-        return entry.closeThing(genericProjection.id);
+        return entry.closeThing(id);
     }
 
     @ThriftMethod
-    public GenericProjection acquireLock(CuratorProjection projection, final String path, int maxWaitMs) throws Exception
+    public LockProjection acquireLock(CuratorProjection projection, final String path, int maxWaitMs) throws Exception
     {
         CuratorEntry entry = getEntry(projection);
         InterProcessSemaphoreMutex lock = new InterProcessSemaphoreMutex(entry.getClient(), path);
         if ( !lock.acquire(maxWaitMs, TimeUnit.MILLISECONDS) )
         {
-            return new GenericProjection();
+            return new LockProjection();
         }
 
         Closer<InterProcessSemaphoreMutex> closer = new Closer<InterProcessSemaphoreMutex>()
@@ -292,7 +292,7 @@ public class CuratorProjectionService
             }
         };
         String id = entry.addThing(lock, closer);
-        return new GenericProjection(id);
+        return new LockProjection(id);
     }
 
     @ThriftMethod
@@ -341,8 +341,7 @@ public class CuratorProjectionService
             leaderLatch.await(waitForLeadershipMs, TimeUnit.MILLISECONDS);
         }
 
-        GenericProjection leaderProjection = new GenericProjection(id);
-        return new LeaderResult(new LeaderProjection(leaderProjection), leaderLatch.hasLeadership());
+        return new LeaderResult(new LeaderProjection(id), leaderLatch.hasLeadership());
     }
 
     @ThriftMethod
@@ -350,7 +349,7 @@ public class CuratorProjectionService
     {
         CuratorEntry entry = getEntry(projection);
 
-        LeaderLatch leaderLatch = getThing(entry, leaderProjection.projection.id, LeaderLatch.class);
+        LeaderLatch leaderLatch = getThing(entry, leaderProjection.id, LeaderLatch.class);
         Collection<Participant> participants = leaderLatch.getParticipants();
         return Lists.transform(Lists.newArrayList(participants), new Function<Participant, RpcParticipant>()
             {
@@ -367,7 +366,7 @@ public class CuratorProjectionService
     {
         CuratorEntry entry = getEntry(projection);
 
-        LeaderLatch leaderLatch = getThing(entry, leaderProjection.projection.id, LeaderLatch.class);
+        LeaderLatch leaderLatch = getThing(entry, leaderProjection.id, LeaderLatch.class);
         return leaderLatch.hasLeadership();
     }
 
@@ -406,7 +405,7 @@ public class CuratorProjectionService
         };
         cache.getListenable().addListener(listener);
 
-        return new PathChildrenCacheProjection(new GenericProjection(id));
+        return new PathChildrenCacheProjection(id);
     }
 
     @ThriftMethod
@@ -414,7 +413,7 @@ public class CuratorProjectionService
     {
         CuratorEntry entry = getEntry(projection);
 
-        PathChildrenCache pathChildrenCache = getThing(entry, cacheProjection.projection.id, PathChildrenCache.class);
+        PathChildrenCache pathChildrenCache = getThing(entry, cacheProjection.id, PathChildrenCache.class);
         return Lists.transform
         (
             pathChildrenCache.getCurrentData(),
@@ -434,7 +433,7 @@ public class CuratorProjectionService
     {
         CuratorEntry entry = getEntry(projection);
 
-        PathChildrenCache pathChildrenCache = getThing(entry, cacheProjection.projection.id, PathChildrenCache.class);
+        PathChildrenCache pathChildrenCache = getThing(entry, cacheProjection.id, PathChildrenCache.class);
         return new RpcChildData(pathChildrenCache.getCurrentData(path));
     }
 
@@ -473,7 +472,7 @@ public class CuratorProjectionService
         };
         cache.getListenable().addListener(listener);
 
-        return new NodeCacheProjection(new GenericProjection(id));
+        return new NodeCacheProjection(id);
     }
 
     @ThriftMethod
@@ -481,7 +480,7 @@ public class CuratorProjectionService
     {
         final CuratorEntry entry = getEntry(projection);
 
-        NodeCache nodeCache = getThing(entry, cacheProjection.projection.id, NodeCache.class);
+        NodeCache nodeCache = getThing(entry, cacheProjection.id, NodeCache.class);
         return new RpcChildData(nodeCache.getCurrentData());
     }
 

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LeaderProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LeaderProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LeaderProjection.java
index 51fb56f..bf66497 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LeaderProjection.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LeaderProjection.java
@@ -7,14 +7,14 @@ import com.facebook.swift.codec.ThriftStruct;
 public class LeaderProjection
 {
     @ThriftField(1)
-    public GenericProjection projection;
+    public String id;
 
     public LeaderProjection()
     {
     }
 
-    public LeaderProjection(GenericProjection projection)
+    public LeaderProjection(String id)
     {
-        this.projection = projection;
+        this.id = id;
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LockProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LockProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LockProjection.java
new file mode 100644
index 0000000..83bb68b
--- /dev/null
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/LockProjection.java
@@ -0,0 +1,20 @@
+package org.apache.curator.x.rpc.idl.projection;
+
+import com.facebook.swift.codec.ThriftField;
+import com.facebook.swift.codec.ThriftStruct;
+
+@ThriftStruct
+public class LockProjection
+{
+    @ThriftField(1)
+    public String id;
+
+    public LockProjection()
+    {
+    }
+
+    public LockProjection(String id)
+    {
+        this.id = id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/NodeCacheProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/NodeCacheProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/NodeCacheProjection.java
index 43d1138..7fa8957 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/NodeCacheProjection.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/NodeCacheProjection.java
@@ -7,14 +7,14 @@ import com.facebook.swift.codec.ThriftStruct;
 public class NodeCacheProjection
 {
     @ThriftField(1)
-    public GenericProjection projection;
+    public String id;
 
     public NodeCacheProjection()
     {
     }
 
-    public NodeCacheProjection(GenericProjection projection)
+    public NodeCacheProjection(String id)
     {
-        this.projection = projection;
+        this.id = id;
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/PathChildrenCacheProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/PathChildrenCacheProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/PathChildrenCacheProjection.java
index 666f43c..a1ee396 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/PathChildrenCacheProjection.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/projection/PathChildrenCacheProjection.java
@@ -7,14 +7,14 @@ import com.facebook.swift.codec.ThriftStruct;
 public class PathChildrenCacheProjection
 {
     @ThriftField(1)
-    public GenericProjection projection;
+    public String id;
 
     public PathChildrenCacheProjection()
     {
     }
 
-    public PathChildrenCacheProjection(GenericProjection projection)
+    public PathChildrenCacheProjection(String id)
     {
-        this.projection = projection;
+        this.id = id;
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/main/thrift/curator.thrift
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/thrift/curator.thrift b/curator-x-rpc/src/main/thrift/curator.thrift
index 6ed104d..bd4753a 100644
--- a/curator-x-rpc/src/main/thrift/curator.thrift
+++ b/curator-x-rpc/src/main/thrift/curator.thrift
@@ -55,15 +55,19 @@ struct GetDataSpec {
 }
 
 struct LeaderProjection {
-  1: GenericProjection projection;
+  1: string id;
+}
+
+struct LockProjection {
+  1: string id;
 }
 
 struct NodeCacheProjection {
-  1: GenericProjection projection;
+  1: string id;
 }
 
 struct PathChildrenCacheProjection {
-  1: GenericProjection projection;
+  1: string id;
 }
 
 struct Version {
@@ -183,9 +187,9 @@ struct CuratorEvent {
 }
 
 service CuratorService {
-  GenericProjection acquireLock(1: CuratorProjection projection, 2: string path, 3: i32 maxWaitMs);
+  LockProjection acquireLock(1: CuratorProjection projection, 2: string path, 3: i32 maxWaitMs);
   void closeCuratorProjection(1: CuratorProjection projection);
-  bool closeGenericProjection(1: CuratorProjection curatorProjection, 2: GenericProjection genericProjection);
+  bool closeGenericProjection(1: CuratorProjection curatorProjection, 2: string id);
   OptionalPath createNode(1: CuratorProjection projection, 2: CreateSpec spec);
   void deleteNode(1: CuratorProjection projection, 2: DeleteSpec spec);
   OptionalStat exists(1: CuratorProjection projection, 2: ExistsSpec spec);

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java
index da9ae2c..100b6c7 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java
@@ -36,11 +36,11 @@ public class CuratorService {
 
   public interface Iface {
 
-    public GenericProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws org.apache.thrift.TException;
+    public LockProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws org.apache.thrift.TException;
 
     public void closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException;
 
-    public boolean closeGenericProjection(CuratorProjection curatorProjection, GenericProjection genericProjection) throws org.apache.thrift.TException;
+    public boolean closeGenericProjection(CuratorProjection curatorProjection, String id) throws org.apache.thrift.TException;
 
     public OptionalPath createNode(CuratorProjection projection, CreateSpec spec) throws org.apache.thrift.TException;
 
@@ -80,7 +80,7 @@ public class CuratorService {
 
     public void closeCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void closeGenericProjection(CuratorProjection curatorProjection, GenericProjection genericProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void closeGenericProjection(CuratorProjection curatorProjection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void createNode(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -134,7 +134,7 @@ public class CuratorService {
       super(iprot, oprot);
     }
 
-    public GenericProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws org.apache.thrift.TException
+    public LockProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws org.apache.thrift.TException
     {
       send_acquireLock(projection, path, maxWaitMs);
       return recv_acquireLock();
@@ -149,7 +149,7 @@ public class CuratorService {
       sendBase("acquireLock", args);
     }
 
-    public GenericProjection recv_acquireLock() throws org.apache.thrift.TException
+    public LockProjection recv_acquireLock() throws org.apache.thrift.TException
     {
       acquireLock_result result = new acquireLock_result();
       receiveBase(result, "acquireLock");
@@ -179,17 +179,17 @@ public class CuratorService {
       return;
     }
 
-    public boolean closeGenericProjection(CuratorProjection curatorProjection, GenericProjection genericProjection) throws org.apache.thrift.TException
+    public boolean closeGenericProjection(CuratorProjection curatorProjection, String id) throws org.apache.thrift.TException
     {
-      send_closeGenericProjection(curatorProjection, genericProjection);
+      send_closeGenericProjection(curatorProjection, id);
       return recv_closeGenericProjection();
     }
 
-    public void send_closeGenericProjection(CuratorProjection curatorProjection, GenericProjection genericProjection) throws org.apache.thrift.TException
+    public void send_closeGenericProjection(CuratorProjection curatorProjection, String id) throws org.apache.thrift.TException
     {
       closeGenericProjection_args args = new closeGenericProjection_args();
       args.setCuratorProjection(curatorProjection);
-      args.setGenericProjection(genericProjection);
+      args.setId(id);
       sendBase("closeGenericProjection", args);
     }
 
@@ -613,7 +613,7 @@ public class CuratorService {
         prot.writeMessageEnd();
       }
 
-      public GenericProjection getResult() throws org.apache.thrift.TException {
+      public LockProjection getResult() throws org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -655,27 +655,27 @@ public class CuratorService {
       }
     }
 
-    public void closeGenericProjection(CuratorProjection curatorProjection, GenericProjection genericProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void closeGenericProjection(CuratorProjection curatorProjection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      closeGenericProjection_call method_call = new closeGenericProjection_call(curatorProjection, genericProjection, resultHandler, this, ___protocolFactory, ___transport);
+      closeGenericProjection_call method_call = new closeGenericProjection_call(curatorProjection, id, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class closeGenericProjection_call extends org.apache.thrift.async.TAsyncMethodCall {
       private CuratorProjection curatorProjection;
-      private GenericProjection genericProjection;
-      public closeGenericProjection_call(CuratorProjection curatorProjection, GenericProjection genericProjection, 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 {
+      private String id;
+      public closeGenericProjection_call(CuratorProjection curatorProjection, 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.curatorProjection = curatorProjection;
-        this.genericProjection = genericProjection;
+        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("closeGenericProjection", org.apache.thrift.protocol.TMessageType.CALL, 0));
         closeGenericProjection_args args = new closeGenericProjection_args();
         args.setCuratorProjection(curatorProjection);
-        args.setGenericProjection(genericProjection);
+        args.setId(id);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -1325,7 +1325,7 @@ public class CuratorService {
 
       public closeGenericProjection_result getResult(I iface, closeGenericProjection_args args) throws org.apache.thrift.TException {
         closeGenericProjection_result result = new closeGenericProjection_result();
-        result.success = iface.closeGenericProjection(args.curatorProjection, args.genericProjection);
+        result.success = iface.closeGenericProjection(args.curatorProjection, args.id);
         result.setSuccessIsSet(true);
         return result;
       }
@@ -1666,7 +1666,7 @@ public class CuratorService {
       return processMap;
     }
 
-    public static class acquireLock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, acquireLock_args, GenericProjection> {
+    public static class acquireLock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, acquireLock_args, LockProjection> {
       public acquireLock() {
         super("acquireLock");
       }
@@ -1675,10 +1675,10 @@ public class CuratorService {
         return new acquireLock_args();
       }
 
-      public AsyncMethodCallback<GenericProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+      public AsyncMethodCallback<LockProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<GenericProjection>() { 
-          public void onComplete(GenericProjection o) {
+        return new AsyncMethodCallback<LockProjection>() { 
+          public void onComplete(LockProjection o) {
             acquireLock_result result = new acquireLock_result();
             result.success = o;
             try {
@@ -1712,7 +1712,7 @@ public class CuratorService {
         return false;
       }
 
-      public void start(I iface, acquireLock_args args, org.apache.thrift.async.AsyncMethodCallback<GenericProjection> resultHandler) throws TException {
+      public void start(I iface, acquireLock_args args, org.apache.thrift.async.AsyncMethodCallback<LockProjection> resultHandler) throws TException {
         iface.acquireLock(args.projection, args.path, args.maxWaitMs,resultHandler);
       }
     }
@@ -1815,7 +1815,7 @@ public class CuratorService {
       }
 
       public void start(I iface, closeGenericProjection_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
-        iface.closeGenericProjection(args.curatorProjection, args.genericProjection,resultHandler);
+        iface.closeGenericProjection(args.curatorProjection, args.id,resultHandler);
       }
     }
 
@@ -3154,7 +3154,7 @@ public class CuratorService {
       schemes.put(TupleScheme.class, new acquireLock_resultTupleSchemeFactory());
     }
 
-    public GenericProjection success; // required
+    public LockProjection success; // 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 {
@@ -3219,7 +3219,7 @@ public class CuratorService {
     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, GenericProjection.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockProjection.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireLock_result.class, metaDataMap);
     }
@@ -3228,7 +3228,7 @@ public class CuratorService {
     }
 
     public acquireLock_result(
-      GenericProjection success)
+      LockProjection success)
     {
       this();
       this.success = success;
@@ -3239,7 +3239,7 @@ public class CuratorService {
      */
     public acquireLock_result(acquireLock_result other) {
       if (other.isSetSuccess()) {
-        this.success = new GenericProjection(other.success);
+        this.success = new LockProjection(other.success);
       }
     }
 
@@ -3252,11 +3252,11 @@ public class CuratorService {
       this.success = null;
     }
 
-    public GenericProjection getSuccess() {
+    public LockProjection getSuccess() {
       return this.success;
     }
 
-    public acquireLock_result setSuccess(GenericProjection success) {
+    public acquireLock_result setSuccess(LockProjection success) {
       this.success = success;
       return this;
     }
@@ -3282,7 +3282,7 @@ public class CuratorService {
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((GenericProjection)value);
+          setSuccess((LockProjection)value);
         }
         break;
 
@@ -3434,7 +3434,7 @@ public class CuratorService {
           switch (schemeField.id) {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.success = new GenericProjection();
+                struct.success = new LockProjection();
                 struct.success.read(iprot);
                 struct.setSuccessIsSet(true);
               } else { 
@@ -3493,7 +3493,7 @@ public class CuratorService {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
-          struct.success = new GenericProjection();
+          struct.success = new LockProjection();
           struct.success.read(iprot);
           struct.setSuccessIsSet(true);
         }
@@ -4111,7 +4111,7 @@ public class CuratorService {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeGenericProjection_args");
 
     private static final org.apache.thrift.protocol.TField CURATOR_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("curatorProjection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField GENERIC_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("genericProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    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)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -4120,12 +4120,12 @@ public class CuratorService {
     }
 
     public CuratorProjection curatorProjection; // required
-    public GenericProjection genericProjection; // 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 {
       CURATOR_PROJECTION((short)1, "curatorProjection"),
-      GENERIC_PROJECTION((short)2, "genericProjection");
+      ID((short)2, "id");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -4142,8 +4142,8 @@ public class CuratorService {
         switch(fieldId) {
           case 1: // CURATOR_PROJECTION
             return CURATOR_PROJECTION;
-          case 2: // GENERIC_PROJECTION
-            return GENERIC_PROJECTION;
+          case 2: // ID
+            return ID;
           default:
             return null;
         }
@@ -4189,8 +4189,8 @@ public class CuratorService {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.CURATOR_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("curatorProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
-      tmpMap.put(_Fields.GENERIC_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("genericProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GenericProjection.class)));
+      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(closeGenericProjection_args.class, metaDataMap);
     }
@@ -4200,11 +4200,11 @@ public class CuratorService {
 
     public closeGenericProjection_args(
       CuratorProjection curatorProjection,
-      GenericProjection genericProjection)
+      String id)
     {
       this();
       this.curatorProjection = curatorProjection;
-      this.genericProjection = genericProjection;
+      this.id = id;
     }
 
     /**
@@ -4214,8 +4214,8 @@ public class CuratorService {
       if (other.isSetCuratorProjection()) {
         this.curatorProjection = new CuratorProjection(other.curatorProjection);
       }
-      if (other.isSetGenericProjection()) {
-        this.genericProjection = new GenericProjection(other.genericProjection);
+      if (other.isSetId()) {
+        this.id = other.id;
       }
     }
 
@@ -4226,7 +4226,7 @@ public class CuratorService {
     @Override
     public void clear() {
       this.curatorProjection = null;
-      this.genericProjection = null;
+      this.id = null;
     }
 
     public CuratorProjection getCuratorProjection() {
@@ -4253,27 +4253,27 @@ public class CuratorService {
       }
     }
 
-    public GenericProjection getGenericProjection() {
-      return this.genericProjection;
+    public String getId() {
+      return this.id;
     }
 
-    public closeGenericProjection_args setGenericProjection(GenericProjection genericProjection) {
-      this.genericProjection = genericProjection;
+    public closeGenericProjection_args setId(String id) {
+      this.id = id;
       return this;
     }
 
-    public void unsetGenericProjection() {
-      this.genericProjection = null;
+    public void unsetId() {
+      this.id = null;
     }
 
-    /** Returns true if field genericProjection is set (has been assigned a value) and false otherwise */
-    public boolean isSetGenericProjection() {
-      return this.genericProjection != 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 setGenericProjectionIsSet(boolean value) {
+    public void setIdIsSet(boolean value) {
       if (!value) {
-        this.genericProjection = null;
+        this.id = null;
       }
     }
 
@@ -4287,11 +4287,11 @@ public class CuratorService {
         }
         break;
 
-      case GENERIC_PROJECTION:
+      case ID:
         if (value == null) {
-          unsetGenericProjection();
+          unsetId();
         } else {
-          setGenericProjection((GenericProjection)value);
+          setId((String)value);
         }
         break;
 
@@ -4303,8 +4303,8 @@ public class CuratorService {
       case CURATOR_PROJECTION:
         return getCuratorProjection();
 
-      case GENERIC_PROJECTION:
-        return getGenericProjection();
+      case ID:
+        return getId();
 
       }
       throw new IllegalStateException();
@@ -4319,8 +4319,8 @@ public class CuratorService {
       switch (field) {
       case CURATOR_PROJECTION:
         return isSetCuratorProjection();
-      case GENERIC_PROJECTION:
-        return isSetGenericProjection();
+      case ID:
+        return isSetId();
       }
       throw new IllegalStateException();
     }
@@ -4347,12 +4347,12 @@ public class CuratorService {
           return false;
       }
 
-      boolean this_present_genericProjection = true && this.isSetGenericProjection();
-      boolean that_present_genericProjection = true && that.isSetGenericProjection();
-      if (this_present_genericProjection || that_present_genericProjection) {
-        if (!(this_present_genericProjection && that_present_genericProjection))
+      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.genericProjection.equals(that.genericProjection))
+        if (!this.id.equals(that.id))
           return false;
       }
 
@@ -4382,12 +4382,12 @@ public class CuratorService {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetGenericProjection()).compareTo(other.isSetGenericProjection());
+      lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetGenericProjection()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.genericProjection, other.genericProjection);
+      if (isSetId()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -4420,11 +4420,11 @@ public class CuratorService {
       }
       first = false;
       if (!first) sb.append(", ");
-      sb.append("genericProjection:");
-      if (this.genericProjection == null) {
+      sb.append("id:");
+      if (this.id == null) {
         sb.append("null");
       } else {
-        sb.append(this.genericProjection);
+        sb.append(this.id);
       }
       first = false;
       sb.append(")");
@@ -4437,9 +4437,6 @@ public class CuratorService {
       if (curatorProjection != null) {
         curatorProjection.validate();
       }
-      if (genericProjection != null) {
-        genericProjection.validate();
-      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -4485,11 +4482,10 @@ public class CuratorService {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // GENERIC_PROJECTION
-              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.genericProjection = new GenericProjection();
-                struct.genericProjection.read(iprot);
-                struct.setGenericProjectionIsSet(true);
+            case 2: // 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);
               }
@@ -4514,9 +4510,9 @@ public class CuratorService {
           struct.curatorProjection.write(oprot);
           oprot.writeFieldEnd();
         }
-        if (struct.genericProjection != null) {
-          oprot.writeFieldBegin(GENERIC_PROJECTION_FIELD_DESC);
-          struct.genericProjection.write(oprot);
+        if (struct.id != null) {
+          oprot.writeFieldBegin(ID_FIELD_DESC);
+          oprot.writeString(struct.id);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -4540,15 +4536,15 @@ public class CuratorService {
         if (struct.isSetCuratorProjection()) {
           optionals.set(0);
         }
-        if (struct.isSetGenericProjection()) {
+        if (struct.isSetId()) {
           optionals.set(1);
         }
         oprot.writeBitSet(optionals, 2);
         if (struct.isSetCuratorProjection()) {
           struct.curatorProjection.write(oprot);
         }
-        if (struct.isSetGenericProjection()) {
-          struct.genericProjection.write(oprot);
+        if (struct.isSetId()) {
+          oprot.writeString(struct.id);
         }
       }
 
@@ -4562,9 +4558,8 @@ public class CuratorService {
           struct.setCuratorProjectionIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.genericProjection = new GenericProjection();
-          struct.genericProjection.read(iprot);
-          struct.setGenericProjectionIsSet(true);
+          struct.id = iprot.readString();
+          struct.setIdIsSet(true);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java
index 69c18bd..e5ddff9 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
 public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjection, LeaderProjection._Fields>, java.io.Serializable, Cloneable, Comparable<LeaderProjection> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LeaderProjection");
 
-  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 ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -43,11 +43,11 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
     schemes.put(TupleScheme.class, new LeaderProjectionTupleSchemeFactory());
   }
 
-  public GenericProjection projection; // 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");
+    ID((short)1, "id");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -62,8 +62,8 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // PROJECTION
-          return PROJECTION;
+        case 1: // ID
+          return ID;
         default:
           return null;
       }
@@ -107,8 +107,8 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
   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, GenericProjection.class)));
+    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(LeaderProjection.class, metaDataMap);
   }
@@ -117,18 +117,18 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
   }
 
   public LeaderProjection(
-    GenericProjection projection)
+    String id)
   {
     this();
-    this.projection = projection;
+    this.id = id;
   }
 
   /**
    * Performs a deep copy on <i>other</i>.
    */
   public LeaderProjection(LeaderProjection other) {
-    if (other.isSetProjection()) {
-      this.projection = new GenericProjection(other.projection);
+    if (other.isSetId()) {
+      this.id = other.id;
     }
   }
 
@@ -138,40 +138,40 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
 
   @Override
   public void clear() {
-    this.projection = null;
+    this.id = null;
   }
 
-  public GenericProjection getProjection() {
-    return this.projection;
+  public String getId() {
+    return this.id;
   }
 
-  public LeaderProjection setProjection(GenericProjection projection) {
-    this.projection = projection;
+  public LeaderProjection setId(String id) {
+    this.id = id;
     return this;
   }
 
-  public void unsetProjection() {
-    this.projection = null;
+  public void unsetId() {
+    this.id = null;
   }
 
-  /** Returns true if field projection is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjection() {
-    return this.projection != 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 setProjectionIsSet(boolean value) {
+  public void setIdIsSet(boolean value) {
     if (!value) {
-      this.projection = null;
+      this.id = null;
     }
   }
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case PROJECTION:
+    case ID:
       if (value == null) {
-        unsetProjection();
+        unsetId();
       } else {
-        setProjection((GenericProjection)value);
+        setId((String)value);
       }
       break;
 
@@ -180,8 +180,8 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case PROJECTION:
-      return getProjection();
+    case ID:
+      return getId();
 
     }
     throw new IllegalStateException();
@@ -194,8 +194,8 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
     }
 
     switch (field) {
-    case PROJECTION:
-      return isSetProjection();
+    case ID:
+      return isSetId();
     }
     throw new IllegalStateException();
   }
@@ -213,12 +213,12 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
     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))
+    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.projection.equals(that.projection))
+      if (!this.id.equals(that.id))
         return false;
     }
 
@@ -238,12 +238,12 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
+    lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProjection()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
+    if (isSetId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -268,11 +268,11 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
     StringBuilder sb = new StringBuilder("LeaderProjection(");
     boolean first = true;
 
-    sb.append("projection:");
-    if (this.projection == null) {
+    sb.append("id:");
+    if (this.id == null) {
       sb.append("null");
     } else {
-      sb.append(this.projection);
+      sb.append(this.id);
     }
     first = false;
     sb.append(")");
@@ -282,9 +282,6 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
     // check for sub-struct validity
-    if (projection != null) {
-      projection.validate();
-    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -321,11 +318,10 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
           break;
         }
         switch (schemeField.id) {
-          case 1: // PROJECTION
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-              struct.projection = new GenericProjection();
-              struct.projection.read(iprot);
-              struct.setProjectionIsSet(true);
+          case 1: // 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);
             }
@@ -345,9 +341,9 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.projection != null) {
-        oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
-        struct.projection.write(oprot);
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
         oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
@@ -368,12 +364,12 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
     public void write(org.apache.thrift.protocol.TProtocol prot, LeaderProjection struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
-      if (struct.isSetProjection()) {
+      if (struct.isSetId()) {
         optionals.set(0);
       }
       oprot.writeBitSet(optionals, 1);
-      if (struct.isSetProjection()) {
-        struct.projection.write(oprot);
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
       }
     }
 
@@ -382,9 +378,8 @@ public class LeaderProjection implements org.apache.thrift.TBase<LeaderProjectio
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.projection = new GenericProjection();
-        struct.projection.read(iprot);
-        struct.setProjectionIsSet(true);
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java
new file mode 100644
index 0000000..4927e72
--- /dev/null
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java
@@ -0,0 +1,388 @@
+/**
+ * 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 LockProjection implements org.apache.thrift.TBase<LockProjection, LockProjection._Fields>, java.io.Serializable, Cloneable, Comparable<LockProjection> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockProjection");
+
+  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)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new LockProjectionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new LockProjectionTupleSchemeFactory());
+  }
+
+  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 {
+    ID((short)1, "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: // 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.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(LockProjection.class, metaDataMap);
+  }
+
+  public LockProjection() {
+  }
+
+  public LockProjection(
+    String id)
+  {
+    this();
+    this.id = id;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public LockProjection(LockProjection other) {
+    if (other.isSetId()) {
+      this.id = other.id;
+    }
+  }
+
+  public LockProjection deepCopy() {
+    return new LockProjection(this);
+  }
+
+  @Override
+  public void clear() {
+    this.id = null;
+  }
+
+  public String getId() {
+    return this.id;
+  }
+
+  public LockProjection 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 ID:
+      if (value == null) {
+        unsetId();
+      } else {
+        setId((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    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 ID:
+      return isSetId();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof LockProjection)
+      return this.equals((LockProjection)that);
+    return false;
+  }
+
+  public boolean equals(LockProjection that) {
+    if (that == null)
+      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(LockProjection other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    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("LockProjection(");
+    boolean first = true;
+
+    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
+  }
+
+  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 LockProjectionStandardSchemeFactory implements SchemeFactory {
+    public LockProjectionStandardScheme getScheme() {
+      return new LockProjectionStandardScheme();
+    }
+  }
+
+  private static class LockProjectionStandardScheme extends StandardScheme<LockProjection> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, LockProjection 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: // 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, LockProjection struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class LockProjectionTupleSchemeFactory implements SchemeFactory {
+    public LockProjectionTupleScheme getScheme() {
+      return new LockProjectionTupleScheme();
+    }
+  }
+
+  private static class LockProjectionTupleScheme extends TupleScheme<LockProjection> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, LockProjection struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetId()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, LockProjection struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java
index 083b936..c5f6df9 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
 public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCacheProjection, NodeCacheProjection._Fields>, java.io.Serializable, Cloneable, Comparable<NodeCacheProjection> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NodeCacheProjection");
 
-  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 ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -43,11 +43,11 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
     schemes.put(TupleScheme.class, new NodeCacheProjectionTupleSchemeFactory());
   }
 
-  public GenericProjection projection; // 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");
+    ID((short)1, "id");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -62,8 +62,8 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // PROJECTION
-          return PROJECTION;
+        case 1: // ID
+          return ID;
         default:
           return null;
       }
@@ -107,8 +107,8 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
   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, GenericProjection.class)));
+    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(NodeCacheProjection.class, metaDataMap);
   }
@@ -117,18 +117,18 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
   }
 
   public NodeCacheProjection(
-    GenericProjection projection)
+    String id)
   {
     this();
-    this.projection = projection;
+    this.id = id;
   }
 
   /**
    * Performs a deep copy on <i>other</i>.
    */
   public NodeCacheProjection(NodeCacheProjection other) {
-    if (other.isSetProjection()) {
-      this.projection = new GenericProjection(other.projection);
+    if (other.isSetId()) {
+      this.id = other.id;
     }
   }
 
@@ -138,40 +138,40 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
 
   @Override
   public void clear() {
-    this.projection = null;
+    this.id = null;
   }
 
-  public GenericProjection getProjection() {
-    return this.projection;
+  public String getId() {
+    return this.id;
   }
 
-  public NodeCacheProjection setProjection(GenericProjection projection) {
-    this.projection = projection;
+  public NodeCacheProjection setId(String id) {
+    this.id = id;
     return this;
   }
 
-  public void unsetProjection() {
-    this.projection = null;
+  public void unsetId() {
+    this.id = null;
   }
 
-  /** Returns true if field projection is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjection() {
-    return this.projection != 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 setProjectionIsSet(boolean value) {
+  public void setIdIsSet(boolean value) {
     if (!value) {
-      this.projection = null;
+      this.id = null;
     }
   }
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case PROJECTION:
+    case ID:
       if (value == null) {
-        unsetProjection();
+        unsetId();
       } else {
-        setProjection((GenericProjection)value);
+        setId((String)value);
       }
       break;
 
@@ -180,8 +180,8 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case PROJECTION:
-      return getProjection();
+    case ID:
+      return getId();
 
     }
     throw new IllegalStateException();
@@ -194,8 +194,8 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
     }
 
     switch (field) {
-    case PROJECTION:
-      return isSetProjection();
+    case ID:
+      return isSetId();
     }
     throw new IllegalStateException();
   }
@@ -213,12 +213,12 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
     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))
+    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.projection.equals(that.projection))
+      if (!this.id.equals(that.id))
         return false;
     }
 
@@ -238,12 +238,12 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
+    lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProjection()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
+    if (isSetId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -268,11 +268,11 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
     StringBuilder sb = new StringBuilder("NodeCacheProjection(");
     boolean first = true;
 
-    sb.append("projection:");
-    if (this.projection == null) {
+    sb.append("id:");
+    if (this.id == null) {
       sb.append("null");
     } else {
-      sb.append(this.projection);
+      sb.append(this.id);
     }
     first = false;
     sb.append(")");
@@ -282,9 +282,6 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
     // check for sub-struct validity
-    if (projection != null) {
-      projection.validate();
-    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -321,11 +318,10 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
           break;
         }
         switch (schemeField.id) {
-          case 1: // PROJECTION
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-              struct.projection = new GenericProjection();
-              struct.projection.read(iprot);
-              struct.setProjectionIsSet(true);
+          case 1: // 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);
             }
@@ -345,9 +341,9 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.projection != null) {
-        oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
-        struct.projection.write(oprot);
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
         oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
@@ -368,12 +364,12 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
     public void write(org.apache.thrift.protocol.TProtocol prot, NodeCacheProjection struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
-      if (struct.isSetProjection()) {
+      if (struct.isSetId()) {
         optionals.set(0);
       }
       oprot.writeBitSet(optionals, 1);
-      if (struct.isSetProjection()) {
-        struct.projection.write(oprot);
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
       }
     }
 
@@ -382,9 +378,8 @@ public class NodeCacheProjection implements org.apache.thrift.TBase<NodeCachePro
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.projection = new GenericProjection();
-        struct.projection.read(iprot);
-        struct.setProjectionIsSet(true);
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java
index dbef1cb..555540a 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
 public class PathChildrenCacheProjection implements org.apache.thrift.TBase<PathChildrenCacheProjection, PathChildrenCacheProjection._Fields>, java.io.Serializable, Cloneable, Comparable<PathChildrenCacheProjection> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PathChildrenCacheProjection");
 
-  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 ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -43,11 +43,11 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
     schemes.put(TupleScheme.class, new PathChildrenCacheProjectionTupleSchemeFactory());
   }
 
-  public GenericProjection projection; // 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");
+    ID((short)1, "id");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -62,8 +62,8 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // PROJECTION
-          return PROJECTION;
+        case 1: // ID
+          return ID;
         default:
           return null;
       }
@@ -107,8 +107,8 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
   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, GenericProjection.class)));
+    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(PathChildrenCacheProjection.class, metaDataMap);
   }
@@ -117,18 +117,18 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
   }
 
   public PathChildrenCacheProjection(
-    GenericProjection projection)
+    String id)
   {
     this();
-    this.projection = projection;
+    this.id = id;
   }
 
   /**
    * Performs a deep copy on <i>other</i>.
    */
   public PathChildrenCacheProjection(PathChildrenCacheProjection other) {
-    if (other.isSetProjection()) {
-      this.projection = new GenericProjection(other.projection);
+    if (other.isSetId()) {
+      this.id = other.id;
     }
   }
 
@@ -138,40 +138,40 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
 
   @Override
   public void clear() {
-    this.projection = null;
+    this.id = null;
   }
 
-  public GenericProjection getProjection() {
-    return this.projection;
+  public String getId() {
+    return this.id;
   }
 
-  public PathChildrenCacheProjection setProjection(GenericProjection projection) {
-    this.projection = projection;
+  public PathChildrenCacheProjection setId(String id) {
+    this.id = id;
     return this;
   }
 
-  public void unsetProjection() {
-    this.projection = null;
+  public void unsetId() {
+    this.id = null;
   }
 
-  /** Returns true if field projection is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjection() {
-    return this.projection != 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 setProjectionIsSet(boolean value) {
+  public void setIdIsSet(boolean value) {
     if (!value) {
-      this.projection = null;
+      this.id = null;
     }
   }
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case PROJECTION:
+    case ID:
       if (value == null) {
-        unsetProjection();
+        unsetId();
       } else {
-        setProjection((GenericProjection)value);
+        setId((String)value);
       }
       break;
 
@@ -180,8 +180,8 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case PROJECTION:
-      return getProjection();
+    case ID:
+      return getId();
 
     }
     throw new IllegalStateException();
@@ -194,8 +194,8 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
     }
 
     switch (field) {
-    case PROJECTION:
-      return isSetProjection();
+    case ID:
+      return isSetId();
     }
     throw new IllegalStateException();
   }
@@ -213,12 +213,12 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
     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))
+    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.projection.equals(that.projection))
+      if (!this.id.equals(that.id))
         return false;
     }
 
@@ -238,12 +238,12 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
+    lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetProjection()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
+    if (isSetId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -268,11 +268,11 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
     StringBuilder sb = new StringBuilder("PathChildrenCacheProjection(");
     boolean first = true;
 
-    sb.append("projection:");
-    if (this.projection == null) {
+    sb.append("id:");
+    if (this.id == null) {
       sb.append("null");
     } else {
-      sb.append(this.projection);
+      sb.append(this.id);
     }
     first = false;
     sb.append(")");
@@ -282,9 +282,6 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
     // check for sub-struct validity
-    if (projection != null) {
-      projection.validate();
-    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -321,11 +318,10 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
           break;
         }
         switch (schemeField.id) {
-          case 1: // PROJECTION
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-              struct.projection = new GenericProjection();
-              struct.projection.read(iprot);
-              struct.setProjectionIsSet(true);
+          case 1: // 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);
             }
@@ -345,9 +341,9 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.projection != null) {
-        oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
-        struct.projection.write(oprot);
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
         oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
@@ -368,12 +364,12 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
     public void write(org.apache.thrift.protocol.TProtocol prot, PathChildrenCacheProjection struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
-      if (struct.isSetProjection()) {
+      if (struct.isSetId()) {
         optionals.set(0);
       }
       oprot.writeBitSet(optionals, 1);
-      if (struct.isSetProjection()) {
-        struct.projection.write(oprot);
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
       }
     }
 
@@ -382,9 +378,8 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase<Path
       TTupleProtocol iprot = (TTupleProtocol) prot;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.projection = new GenericProjection();
-        struct.projection.read(iprot);
-        struct.setProjectionIsSet(true);
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/curator/blob/6e9fa2a4/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java b/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java
index 2ca6e69..8b65beb 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java
@@ -91,8 +91,8 @@ public class TestClient
         ChildData pathChildrenCacheDataForPath = client.getPathChildrenCacheDataForPath(curatorProjection, pathChildrenCacheProjection, "/a/b/c");
         System.out.println(pathChildrenCacheDataForPath);
 
-        GenericProjection lockId = client.acquireLock(curatorProjection, "/mylock", 1000);
-        client.closeGenericProjection(curatorProjection, lockId);
+        LockProjection lockId = client.acquireLock(curatorProjection, "/mylock", 1000);
+        client.closeGenericProjection(curatorProjection, lockId.id);
 
         GetDataSpec getDataSpec = new GetDataSpec();
         getDataSpec.watched = true;
@@ -119,7 +119,7 @@ public class TestClient
         boolean isLeader = client.isLeader(curatorProjection, leader.projection);
         System.out.println("isLeader: " + isLeader);
 
-        client.closeGenericProjection(curatorProjection, leader.projection.projection);
+        client.closeGenericProjection(curatorProjection, leader.projection.id);
 
         pathChildrenCacheData = client.getPathChildrenCacheData(curatorProjection, pathChildrenCacheProjection);
         System.out.println("Child data: " + pathChildrenCacheData);


Mime
View raw message