Return-Path: X-Original-To: apmail-curator-commits-archive@minotaur.apache.org Delivered-To: apmail-curator-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A71111C51 for ; Sat, 7 Jun 2014 18:19:00 +0000 (UTC) Received: (qmail 31784 invoked by uid 500); 7 Jun 2014 18:19:00 -0000 Delivered-To: apmail-curator-commits-archive@curator.apache.org Received: (qmail 31747 invoked by uid 500); 7 Jun 2014 18:19:00 -0000 Mailing-List: contact commits-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list commits@curator.apache.org Received: (qmail 31739 invoked by uid 99); 7 Jun 2014 18:19:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jun 2014 18:19:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3A7F68BBE34; Sat, 7 Jun 2014 18:19:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: randgalt@apache.org To: commits@curator.apache.org Date: Sat, 07 Jun 2014 18:19:04 -0000 Message-Id: <2d3ee2759eff4727ae6112cf0793d82a@git.apache.org> In-Reply-To: <29937670c88a49f291fad4a4fae0fddd@git.apache.org> References: <29937670c88a49f291fad4a4fae0fddd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [06/50] [abbrv] git commit: refactoring 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/master Commit: 6e9fa2a4bac892c42ed85d1af658c5aff41ffbed Parents: 985c9ed Author: randgalt Authored: Thu May 29 20:56:38 2014 -0500 Committer: randgalt 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 closer = new Closer() @@ -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 participants = leaderLatch.getParticipants(); return Lists.transform(Lists.newArrayList(participants), new Function() { @@ -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 extends org.apache.thrift.AsyncProcessFunction { + public static class acquireLock extends org.apache.thrift.AsyncProcessFunction { public acquireLock() { super("acquireLock"); } @@ -1675,10 +1675,10 @@ public class CuratorService { return new acquireLock_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(GenericProjection o) { + return new AsyncMethodCallback() { + 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 resultHandler) throws TException { + public void start(I iface, acquireLock_args args, org.apache.thrift.async.AsyncMethodCallback 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 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, SchemeFactory> schemes = new HashMap, 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 byName = new HashMap(); @@ -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, java.io.Serializable, Cloneable, Comparable { 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -43,11 +43,11 @@ public class LeaderProjection implements org.apache.thrift.TBase byName = new HashMap(); @@ -62,8 +62,8 @@ public class LeaderProjection implements org.apache.thrift.TBase 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.TBaseother. */ 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, java.io.Serializable, Cloneable, Comparable { + 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, SchemeFactory> schemes = new HashMap, 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 byName = new HashMap(); + + 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 other. + */ + 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 { + + 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 { + + @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, java.io.Serializable, Cloneable, Comparable { 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -43,11 +43,11 @@ public class NodeCacheProjection implements org.apache.thrift.TBase byName = new HashMap(); @@ -62,8 +62,8 @@ public class NodeCacheProjection implements org.apache.thrift.TBase 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.TBaseother. */ 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, java.io.Serializable, Cloneable, Comparable { 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -43,11 +43,11 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase byName = new HashMap(); @@ -62,8 +62,8 @@ public class PathChildrenCacheProjection implements org.apache.thrift.TBase 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.TBaseother. */ 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