curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [13/14] git commit: wip
Date Tue, 27 May 2014 13:57:35 GMT
wip


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

Branch: refs/heads/curator-rpc
Commit: 099df94a1453db319b2a5fe4eaa7ff4a5dadf518
Parents: c8d49ae
Author: randgalt <randgalt@apache.org>
Authored: Mon May 26 20:11:27 2014 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Mon May 26 20:11:27 2014 -0500

----------------------------------------------------------------------
 .../org/apache/curator/x/rpc/CuratorEntry.java  |  72 +++++++
 .../curator/x/rpc/CuratorProjectionServer.java  |   2 +-
 .../org/apache/curator/x/rpc/RpcManager.java    |  53 +----
 .../curator/x/rpc/idl/event/EventService.java   |  36 +---
 .../x/rpc/idl/event/RpcCuratorEvent.java        |  11 +-
 .../projection/CuratorProjectionService.java    |  31 +--
 curator-x-rpc/src/main/thrift/curator.thrift    |   3 +-
 .../apache/curator/generated/CuratorEvent.java  | 147 ++------------
 .../apache/curator/generated/EventService.java  | 193 +++++++------------
 .../org/apache/curator/x/rpc/TestClient.java    |   3 +-
 10 files changed, 202 insertions(+), 349 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
new file mode 100644
index 0000000..61f97f3
--- /dev/null
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorEntry.java
@@ -0,0 +1,72 @@
+package org.apache.curator.x.rpc;
+
+import com.google.common.collect.Queues;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.x.rpc.idl.event.RpcCuratorEvent;
+import java.io.Closeable;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+public class CuratorEntry implements Closeable
+{
+    private final CuratorFramework client;
+    private final AtomicLong lastAccessEpoch = new AtomicLong(0);
+    private final BlockingQueue<RpcCuratorEvent> events = Queues.newLinkedBlockingQueue();
+    private final AtomicReference<State> state = new AtomicReference<State>(State.OPEN);
+
+    private enum State
+    {
+        OPEN,
+        CLOSED
+    }
+
+    public CuratorEntry(CuratorFramework client)
+    {
+        this.client = client;
+        updateLastAccess();
+    }
+
+    @Override
+    public void close()
+    {
+        if ( state.compareAndSet(State.OPEN, State.CLOSED) )
+        {
+            client.close();
+            events.clear();
+        }
+    }
+
+    public RpcCuratorEvent pollForEvent(int maxWaitMs) throws InterruptedException
+    {
+        if ( state.get() == State.OPEN )
+        {
+            return events.poll(maxWaitMs, TimeUnit.MILLISECONDS);
+        }
+        return null;
+    }
+
+    public void addEvent(RpcCuratorEvent event)
+    {
+        if ( state.get() == State.OPEN )
+        {
+            events.offer(event);
+        }
+    }
+
+    public void updateLastAccess()
+    {
+        lastAccessEpoch.set(System.currentTimeMillis());
+    }
+
+    public CuratorFramework getClient()
+    {
+        return (state.get() == State.OPEN) ? client : null;
+    }
+
+    public long getLastAccessEpoch()
+    {
+        return lastAccessEpoch.get();
+    }
+}

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
index f5d5649..6f94902 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java
@@ -33,7 +33,7 @@ public class CuratorProjectionServer
     {
         RpcManager rpcManager = new RpcManager();
         EventService eventService = new EventService(rpcManager, 5000); // TODO
-        CuratorProjectionService projectionService = new CuratorProjectionService(rpcManager, eventService);
+        CuratorProjectionService projectionService = new CuratorProjectionService(rpcManager);
         ThriftServiceProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), Lists.<ThriftEventHandler>newArrayList(), projectionService, eventService);
         ThriftServer server = new ThriftServer(processor, new ThriftServerConfig().setPort(8899));  // TODO
         server.start();

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/RpcManager.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/RpcManager.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/RpcManager.java
index bdc5138..dcfa2a0 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/RpcManager.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/RpcManager.java
@@ -2,67 +2,26 @@ package org.apache.curator.x.rpc;
 
 import com.google.common.collect.Maps;
 import org.apache.curator.framework.CuratorFramework;
-import java.util.List;
 import java.util.Map;
-import java.util.concurrent.atomic.AtomicLong;
 
 public class RpcManager
 {
     private final Map<String, CuratorEntry> projections = Maps.newConcurrentMap();
 
-    private static class CuratorEntry
-    {
-        private final CuratorFramework client;
-        private final AtomicLong lastAccessEpoch = new AtomicLong(0);
-
-        private CuratorEntry(CuratorFramework client)
-        {
-            this.client = client;
-            updateLastAccess();
-        }
-
-        void updateLastAccess()
-        {
-            lastAccessEpoch.set(System.currentTimeMillis());
-        }
-    }
-
     public void add(String id, CuratorFramework client)
     {
         projections.put(id, new CuratorEntry(client));
     }
 
-    public void updateLastAccess(String id)
-    {
-        CuratorEntry entry = projections.get(id);
-        if ( entry != null )
-        {
-            entry.updateLastAccess();
-        }
-    }
-
-    public CuratorFramework getClient(String id)
-    {
-        CuratorEntry entry = projections.get(id);
-        if ( entry != null )
-        {
-            entry.updateLastAccess();
-            return entry.client;
-        }
-        return null;
-    }
-
-    public CuratorFramework removeClient(String id)
+    public CuratorEntry get(String id)
     {
-        CuratorEntry entry = projections.remove(id);
-        return (entry != null) ? entry.client : null;
+        CuratorEntry curatorEntry = projections.get(id);
+        curatorEntry.updateLastAccess();
+        return curatorEntry;
     }
 
-    public void touch(List<String> ids)
+    public CuratorEntry remove(String id)
     {
-        for ( String id : ids )
-        {
-            getClient(id);
-        }
+        return projections.remove(id);
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/EventService.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/EventService.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/EventService.java
index 3b7cde9..939eaeb 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/EventService.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/EventService.java
@@ -2,20 +2,13 @@ package org.apache.curator.x.rpc.idl.event;
 
 import com.facebook.swift.service.ThriftMethod;
 import com.facebook.swift.service.ThriftService;
-import com.google.common.base.Function;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Queues;
+import org.apache.curator.x.rpc.CuratorEntry;
 import org.apache.curator.x.rpc.RpcManager;
 import org.apache.curator.x.rpc.idl.projection.CuratorProjection;
-import javax.annotation.Nullable;
-import java.util.List;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
 
 @ThriftService("EventService")
 public class EventService
 {
-    private final BlockingQueue<RpcCuratorEvent> events = Queues.newLinkedBlockingQueue();
     private final RpcManager rpcManager;
     private final int pingTimeMs;
 
@@ -25,31 +18,16 @@ public class EventService
         this.pingTimeMs = pingTimeMs;
     }
 
-    public void addEvent(RpcCuratorEvent event)
-    {
-        events.offer(event);
-    }
-
     @ThriftMethod
-    public RpcCuratorEvent getNextEvent(List<CuratorProjection> projections) throws InterruptedException
+    public RpcCuratorEvent getNextEvent(CuratorProjection projection) throws InterruptedException
     {
-        if ( projections != null )
+        CuratorEntry entry = rpcManager.get(projection.id);
+        if ( entry == null )
         {
-            List<String> ids = Lists.transform
-            (
-                projections,
-                new Function<CuratorProjection, String>()
-                {
-                    @Override
-                    public String apply(CuratorProjection projection)
-                    {
-                        return projection.id;
-                    }
-                }
-            );
-            rpcManager.touch(ids);
+            // TODO
+            return null;
         }
-        RpcCuratorEvent event = events.poll(pingTimeMs, TimeUnit.MILLISECONDS);
+        RpcCuratorEvent event = entry.pollForEvent(pingTimeMs);
         return (event != null) ? event : new RpcCuratorEvent();
     }
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/RpcCuratorEvent.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/RpcCuratorEvent.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/RpcCuratorEvent.java
index 38a5ec3..c6802e4 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/RpcCuratorEvent.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/event/RpcCuratorEvent.java
@@ -25,7 +25,6 @@ import com.google.common.collect.Lists;
 import org.apache.curator.framework.api.CuratorEvent;
 import org.apache.curator.framework.api.CuratorEventType;
 import org.apache.curator.framework.state.ConnectionState;
-import org.apache.curator.x.rpc.idl.projection.CuratorProjection;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.data.ACL;
@@ -37,9 +36,6 @@ import java.util.List;
 @ThriftStruct("CuratorEvent")
 public class RpcCuratorEvent
 {
-    @ThriftField(1)
-    public CuratorProjection projection;
-
     @ThriftField(2)
     public RpcCuratorEventType type;
 
@@ -72,7 +68,6 @@ public class RpcCuratorEvent
 
     public RpcCuratorEvent()
     {
-        this.projection = null;
         this.type = RpcCuratorEventType.PING;
         this.resultCode = 0;
         this.path = null;
@@ -85,9 +80,8 @@ public class RpcCuratorEvent
         this.watchedEvent = null;
     }
 
-    public RpcCuratorEvent(CuratorProjection projection, CuratorEvent event)
+    public RpcCuratorEvent(CuratorEvent event)
     {
-        this.projection = projection;
         this.type = toRpcCuratorEventType(event.getType());
         this.resultCode = event.getResultCode();
         this.path = event.getPath();
@@ -100,9 +94,8 @@ public class RpcCuratorEvent
         this.watchedEvent = toRpcWatchedEvent(event.getWatchedEvent());
     }
 
-    public RpcCuratorEvent(CuratorProjection projection, ConnectionState newState)
+    public RpcCuratorEvent(ConnectionState newState)
     {
-        this.projection = projection;
         this.type = toRpcCuratorEventType(newState);
         this.resultCode = 0;
         this.path = null;

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/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 bca32d9..81f8838 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
@@ -33,8 +33,8 @@ import org.apache.curator.framework.api.PathAndBytesable;
 import org.apache.curator.framework.state.ConnectionState;
 import org.apache.curator.framework.state.ConnectionStateListener;
 import org.apache.curator.retry.RetryOneTime;
+import org.apache.curator.x.rpc.CuratorEntry;
 import org.apache.curator.x.rpc.RpcManager;
-import org.apache.curator.x.rpc.idl.event.EventService;
 import org.apache.curator.x.rpc.idl.event.RpcCuratorEvent;
 import java.util.UUID;
 
@@ -42,12 +42,10 @@ import java.util.UUID;
 public class CuratorProjectionService
 {
     private final RpcManager rpcManager;
-    private final EventService eventService;
 
-    public CuratorProjectionService(RpcManager rpcManager, EventService eventService)
+    public CuratorProjectionService(RpcManager rpcManager)
     {
         this.rpcManager = rpcManager;
-        this.eventService = eventService;
     }
 
     @ThriftMethod
@@ -64,7 +62,7 @@ public class CuratorProjectionService
             @Override
             public void stateChanged(CuratorFramework client, ConnectionState newState)
             {
-                eventService.addEvent(new RpcCuratorEvent(projection, newState));
+                addEvent(projection, new RpcCuratorEvent(newState));
             }
         };
         client.getConnectionStateListenable().addListener(listener);
@@ -72,13 +70,22 @@ public class CuratorProjectionService
         return projection;
     }
 
+    private void addEvent(CuratorProjection projection, RpcCuratorEvent event)
+    {
+        CuratorEntry entry = rpcManager.get(projection.id);
+        if ( entry != null )
+        {
+            entry.addEvent(event);
+        }
+    }
+
     @ThriftMethod
     public void closeCuratorProjection(CuratorProjection projection)
     {
-        CuratorFramework client = rpcManager.removeClient(projection.id);
-        if ( client != null )
+        CuratorEntry entry = rpcManager.remove(projection.id);
+        if ( entry != null )
         {
-            client.close();
+            entry.close();
         }
     }
 
@@ -112,7 +119,7 @@ public class CuratorProjectionService
                 @Override
                 public void processResult(CuratorFramework client, CuratorEvent event) throws Exception
                 {
-                    eventService.addEvent(new RpcCuratorEvent(projection, event));
+                    addEvent(projection, new RpcCuratorEvent(event));
                 }
             };
             builder = castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback);
@@ -150,12 +157,12 @@ public class CuratorProjectionService
 
     private CuratorFramework getClient(CuratorProjection projection) throws Exception
     {
-        CuratorFramework client = rpcManager.getClient(projection.id);
-        if ( client == null )
+        CuratorEntry entry = rpcManager.get(projection.id);
+        if ( entry == null )
         {
             throw new Exception("No client found with id: " + projection.id);
         }
-        return client;
+        return entry.getClient();
     }
 
     private static <T> T castBuilder(Object createBuilder, Class<T> clazz) throws Exception

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/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 100f456..eac5649 100644
--- a/curator-x-rpc/src/main/thrift/curator.thrift
+++ b/curator-x-rpc/src/main/thrift/curator.thrift
@@ -67,7 +67,6 @@ struct Acl {
 }
 
 struct CuratorEvent {
-  1: CuratorProjection projection;
   2: CuratorEventType type;
   3: i32 resultCode;
   4: string path;
@@ -87,5 +86,5 @@ service CuratorService {
 }
 
 service EventService {
-  CuratorEvent getNextEvent(1: list<CuratorProjection> projections);
+  CuratorEvent getNextEvent(1: CuratorProjection projection);
 }

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java
index 41e57dc..8674d26 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java
@@ -35,7 +35,6 @@ import org.slf4j.LoggerFactory;
 public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, CuratorEvent._Fields>, java.io.Serializable, Cloneable, Comparable<CuratorEvent> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CuratorEvent");
 
-  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 TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
   private static final org.apache.thrift.protocol.TField RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("resultCode", org.apache.thrift.protocol.TType.I32, (short)3);
   private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)4);
@@ -53,7 +52,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     schemes.put(TupleScheme.class, new CuratorEventTupleSchemeFactory());
   }
 
-  public CuratorProjection projection; // required
   /**
    * 
    * @see CuratorEventType
@@ -71,7 +69,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
 
   /** 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"),
     /**
      * 
      * @see CuratorEventType
@@ -100,8 +97,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // PROJECTION
-          return PROJECTION;
         case 2: // TYPE
           return TYPE;
         case 3: // RESULT_CODE
@@ -167,8 +162,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
     tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CuratorEventType.class)));
     tmpMap.put(_Fields.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("resultCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
@@ -199,7 +192,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
   }
 
   public CuratorEvent(
-    CuratorProjection projection,
     CuratorEventType type,
     int resultCode,
     String path,
@@ -212,7 +204,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     WatchedEvent watchedEvent)
   {
     this();
-    this.projection = projection;
     this.type = type;
     this.resultCode = resultCode;
     setResultCodeIsSet(true);
@@ -231,9 +222,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
    */
   public CuratorEvent(CuratorEvent other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetProjection()) {
-      this.projection = new CuratorProjection(other.projection);
-    }
     if (other.isSetType()) {
       this.type = other.type;
     }
@@ -276,7 +264,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
 
   @Override
   public void clear() {
-    this.projection = null;
     this.type = null;
     setResultCodeIsSet(false);
     this.resultCode = 0;
@@ -290,30 +277,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     this.watchedEvent = null;
   }
 
-  public CuratorProjection getProjection() {
-    return this.projection;
-  }
-
-  public CuratorEvent setProjection(CuratorProjection projection) {
-    this.projection = projection;
-    return this;
-  }
-
-  public void unsetProjection() {
-    this.projection = null;
-  }
-
-  /** Returns true if field projection is set (has been assigned a value) and false otherwise */
-  public boolean isSetProjection() {
-    return this.projection != null;
-  }
-
-  public void setProjectionIsSet(boolean value) {
-    if (!value) {
-      this.projection = null;
-    }
-  }
-
   /**
    * 
    * @see CuratorEventType
@@ -603,14 +566,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case PROJECTION:
-      if (value == null) {
-        unsetProjection();
-      } else {
-        setProjection((CuratorProjection)value);
-      }
-      break;
-
     case TYPE:
       if (value == null) {
         unsetType();
@@ -696,9 +651,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case PROJECTION:
-      return getProjection();
-
     case TYPE:
       return getType();
 
@@ -740,8 +692,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     }
 
     switch (field) {
-    case PROJECTION:
-      return isSetProjection();
     case TYPE:
       return isSetType();
     case RESULT_CODE:
@@ -779,15 +729,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     if (that == null)
       return false;
 
-    boolean this_present_projection = true && this.isSetProjection();
-    boolean that_present_projection = true && that.isSetProjection();
-    if (this_present_projection || that_present_projection) {
-      if (!(this_present_projection && that_present_projection))
-        return false;
-      if (!this.projection.equals(that.projection))
-        return false;
-    }
-
     boolean this_present_type = true && this.isSetType();
     boolean that_present_type = true && that.isSetType();
     if (this_present_type || that_present_type) {
@@ -894,16 +835,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetProjection()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
     if (lastComparison != 0) {
       return lastComparison;
@@ -1024,14 +955,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     StringBuilder sb = new StringBuilder("CuratorEvent(");
     boolean first = true;
 
-    sb.append("projection:");
-    if (this.projection == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.projection);
-    }
-    first = false;
-    if (!first) sb.append(", ");
     sb.append("type:");
     if (this.type == null) {
       sb.append("null");
@@ -1114,9 +1037,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
     // check for sub-struct validity
-    if (projection != null) {
-      projection.validate();
-    }
     if (stat != null) {
       stat.validate();
     }
@@ -1161,15 +1081,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
           break;
         }
         switch (schemeField.id) {
-          case 1: // PROJECTION
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-              struct.projection = new CuratorProjection();
-              struct.projection.read(iprot);
-              struct.setProjectionIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
           case 2: // TYPE
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.type = CuratorEventType.findByValue(iprot.readI32());
@@ -1288,11 +1199,6 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.projection != null) {
-        oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
-        struct.projection.write(oprot);
-        oprot.writeFieldEnd();
-      }
       if (struct.type != null) {
         oprot.writeFieldBegin(TYPE_FIELD_DESC);
         oprot.writeI32(struct.type.getValue());
@@ -1373,43 +1279,37 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     public void write(org.apache.thrift.protocol.TProtocol prot, CuratorEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol oprot = (TTupleProtocol) prot;
       BitSet optionals = new BitSet();
-      if (struct.isSetProjection()) {
-        optionals.set(0);
-      }
       if (struct.isSetType()) {
-        optionals.set(1);
+        optionals.set(0);
       }
       if (struct.isSetResultCode()) {
-        optionals.set(2);
+        optionals.set(1);
       }
       if (struct.isSetPath()) {
-        optionals.set(3);
+        optionals.set(2);
       }
       if (struct.isSetContext()) {
-        optionals.set(4);
+        optionals.set(3);
       }
       if (struct.isSetStat()) {
-        optionals.set(5);
+        optionals.set(4);
       }
       if (struct.isSetData()) {
-        optionals.set(6);
+        optionals.set(5);
       }
       if (struct.isSetName()) {
-        optionals.set(7);
+        optionals.set(6);
       }
       if (struct.isSetChildren()) {
-        optionals.set(8);
+        optionals.set(7);
       }
       if (struct.isSetAclList()) {
-        optionals.set(9);
+        optionals.set(8);
       }
       if (struct.isSetWatchedEvent()) {
-        optionals.set(10);
-      }
-      oprot.writeBitSet(optionals, 11);
-      if (struct.isSetProjection()) {
-        struct.projection.write(oprot);
+        optionals.set(9);
       }
+      oprot.writeBitSet(optionals, 10);
       if (struct.isSetType()) {
         oprot.writeI32(struct.type.getValue());
       }
@@ -1457,42 +1357,37 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, CuratorEvent struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(11);
+      BitSet incoming = iprot.readBitSet(10);
       if (incoming.get(0)) {
-        struct.projection = new CuratorProjection();
-        struct.projection.read(iprot);
-        struct.setProjectionIsSet(true);
-      }
-      if (incoming.get(1)) {
         struct.type = CuratorEventType.findByValue(iprot.readI32());
         struct.setTypeIsSet(true);
       }
-      if (incoming.get(2)) {
+      if (incoming.get(1)) {
         struct.resultCode = iprot.readI32();
         struct.setResultCodeIsSet(true);
       }
-      if (incoming.get(3)) {
+      if (incoming.get(2)) {
         struct.path = iprot.readString();
         struct.setPathIsSet(true);
       }
-      if (incoming.get(4)) {
+      if (incoming.get(3)) {
         struct.context = iprot.readString();
         struct.setContextIsSet(true);
       }
-      if (incoming.get(5)) {
+      if (incoming.get(4)) {
         struct.stat = new Stat();
         struct.stat.read(iprot);
         struct.setStatIsSet(true);
       }
-      if (incoming.get(6)) {
+      if (incoming.get(5)) {
         struct.data = iprot.readBinary();
         struct.setDataIsSet(true);
       }
-      if (incoming.get(7)) {
+      if (incoming.get(6)) {
         struct.name = iprot.readString();
         struct.setNameIsSet(true);
       }
-      if (incoming.get(8)) {
+      if (incoming.get(7)) {
         {
           org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
           struct.children = new ArrayList<String>(_list10.size);
@@ -1505,7 +1400,7 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
         }
         struct.setChildrenIsSet(true);
       }
-      if (incoming.get(9)) {
+      if (incoming.get(8)) {
         {
           org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
           struct.aclList = new ArrayList<Acl>(_list13.size);
@@ -1519,7 +1414,7 @@ public class CuratorEvent implements org.apache.thrift.TBase<CuratorEvent, Curat
         }
         struct.setAclListIsSet(true);
       }
-      if (incoming.get(10)) {
+      if (incoming.get(9)) {
         struct.watchedEvent = new WatchedEvent();
         struct.watchedEvent.read(iprot);
         struct.setWatchedEventIsSet(true);

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java
index 7b41888..3f9f332 100644
--- a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java
+++ b/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java
@@ -36,13 +36,13 @@ public class EventService {
 
   public interface Iface {
 
-    public CuratorEvent getNextEvent(List<CuratorProjection> projections) throws org.apache.thrift.TException;
+    public CuratorEvent getNextEvent(CuratorProjection projection) throws org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void getNextEvent(List<CuratorProjection> projections, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void getNextEvent(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
   }
 
@@ -66,16 +66,16 @@ public class EventService {
       super(iprot, oprot);
     }
 
-    public CuratorEvent getNextEvent(List<CuratorProjection> projections) throws org.apache.thrift.TException
+    public CuratorEvent getNextEvent(CuratorProjection projection) throws org.apache.thrift.TException
     {
-      send_getNextEvent(projections);
+      send_getNextEvent(projection);
       return recv_getNextEvent();
     }
 
-    public void send_getNextEvent(List<CuratorProjection> projections) throws org.apache.thrift.TException
+    public void send_getNextEvent(CuratorProjection projection) throws org.apache.thrift.TException
     {
       getNextEvent_args args = new getNextEvent_args();
-      args.setProjections(projections);
+      args.setProjection(projection);
       sendBase("getNextEvent", args);
     }
 
@@ -107,24 +107,24 @@ public class EventService {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void getNextEvent(List<CuratorProjection> projections, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void getNextEvent(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getNextEvent_call method_call = new getNextEvent_call(projections, resultHandler, this, ___protocolFactory, ___transport);
+      getNextEvent_call method_call = new getNextEvent_call(projection, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class getNextEvent_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private List<CuratorProjection> projections;
-      public getNextEvent_call(List<CuratorProjection> projections, 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 CuratorProjection projection;
+      public getNextEvent_call(CuratorProjection projection, 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.projections = projections;
+        this.projection = projection;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNextEvent", org.apache.thrift.protocol.TMessageType.CALL, 0));
         getNextEvent_args args = new getNextEvent_args();
-        args.setProjections(projections);
+        args.setProjection(projection);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -171,7 +171,7 @@ public class EventService {
 
       public getNextEvent_result getResult(I iface, getNextEvent_args args) throws org.apache.thrift.TException {
         getNextEvent_result result = new getNextEvent_result();
-        result.success = iface.getNextEvent(args.projections);
+        result.success = iface.getNextEvent(args.projection);
         return result;
       }
     }
@@ -240,7 +240,7 @@ public class EventService {
       }
 
       public void start(I iface, getNextEvent_args args, org.apache.thrift.async.AsyncMethodCallback<CuratorEvent> resultHandler) throws TException {
-        iface.getNextEvent(args.projections,resultHandler);
+        iface.getNextEvent(args.projection,resultHandler);
       }
     }
 
@@ -249,7 +249,7 @@ public class EventService {
   public static class getNextEvent_args implements org.apache.thrift.TBase<getNextEvent_args, getNextEvent_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNextEvent_args>   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNextEvent_args");
 
-    private static final org.apache.thrift.protocol.TField PROJECTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("projections", org.apache.thrift.protocol.TType.LIST, (short)1);
+    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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -257,11 +257,11 @@ public class EventService {
       schemes.put(TupleScheme.class, new getNextEvent_argsTupleSchemeFactory());
     }
 
-    public List<CuratorProjection> projections; // required
+    public CuratorProjection projection; // 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 {
-      PROJECTIONS((short)1, "projections");
+      PROJECTION((short)1, "projection");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -276,8 +276,8 @@ public class EventService {
        */
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
-          case 1: // PROJECTIONS
-            return PROJECTIONS;
+          case 1: // PROJECTION
+            return PROJECTION;
           default:
             return null;
         }
@@ -321,9 +321,8 @@ public class EventService {
     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.PROJECTIONS, new org.apache.thrift.meta_data.FieldMetaData("projections", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))));
+      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNextEvent_args.class, metaDataMap);
     }
@@ -332,22 +331,18 @@ public class EventService {
     }
 
     public getNextEvent_args(
-      List<CuratorProjection> projections)
+      CuratorProjection projection)
     {
       this();
-      this.projections = projections;
+      this.projection = projection;
     }
 
     /**
      * Performs a deep copy on <i>other</i>.
      */
     public getNextEvent_args(getNextEvent_args other) {
-      if (other.isSetProjections()) {
-        List<CuratorProjection> __this__projections = new ArrayList<CuratorProjection>(other.projections.size());
-        for (CuratorProjection other_element : other.projections) {
-          __this__projections.add(new CuratorProjection(other_element));
-        }
-        this.projections = __this__projections;
+      if (other.isSetProjection()) {
+        this.projection = new CuratorProjection(other.projection);
       }
     }
 
@@ -357,55 +352,40 @@ public class EventService {
 
     @Override
     public void clear() {
-      this.projections = null;
-    }
-
-    public int getProjectionsSize() {
-      return (this.projections == null) ? 0 : this.projections.size();
-    }
-
-    public java.util.Iterator<CuratorProjection> getProjectionsIterator() {
-      return (this.projections == null) ? null : this.projections.iterator();
+      this.projection = null;
     }
 
-    public void addToProjections(CuratorProjection elem) {
-      if (this.projections == null) {
-        this.projections = new ArrayList<CuratorProjection>();
-      }
-      this.projections.add(elem);
-    }
-
-    public List<CuratorProjection> getProjections() {
-      return this.projections;
+    public CuratorProjection getProjection() {
+      return this.projection;
     }
 
-    public getNextEvent_args setProjections(List<CuratorProjection> projections) {
-      this.projections = projections;
+    public getNextEvent_args setProjection(CuratorProjection projection) {
+      this.projection = projection;
       return this;
     }
 
-    public void unsetProjections() {
-      this.projections = null;
+    public void unsetProjection() {
+      this.projection = null;
     }
 
-    /** Returns true if field projections is set (has been assigned a value) and false otherwise */
-    public boolean isSetProjections() {
-      return this.projections != null;
+    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
+    public boolean isSetProjection() {
+      return this.projection != null;
     }
 
-    public void setProjectionsIsSet(boolean value) {
+    public void setProjectionIsSet(boolean value) {
       if (!value) {
-        this.projections = null;
+        this.projection = null;
       }
     }
 
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
-      case PROJECTIONS:
+      case PROJECTION:
         if (value == null) {
-          unsetProjections();
+          unsetProjection();
         } else {
-          setProjections((List<CuratorProjection>)value);
+          setProjection((CuratorProjection)value);
         }
         break;
 
@@ -414,8 +394,8 @@ public class EventService {
 
     public Object getFieldValue(_Fields field) {
       switch (field) {
-      case PROJECTIONS:
-        return getProjections();
+      case PROJECTION:
+        return getProjection();
 
       }
       throw new IllegalStateException();
@@ -428,8 +408,8 @@ public class EventService {
       }
 
       switch (field) {
-      case PROJECTIONS:
-        return isSetProjections();
+      case PROJECTION:
+        return isSetProjection();
       }
       throw new IllegalStateException();
     }
@@ -447,12 +427,12 @@ public class EventService {
       if (that == null)
         return false;
 
-      boolean this_present_projections = true && this.isSetProjections();
-      boolean that_present_projections = true && that.isSetProjections();
-      if (this_present_projections || that_present_projections) {
-        if (!(this_present_projections && that_present_projections))
+      boolean this_present_projection = true && this.isSetProjection();
+      boolean that_present_projection = true && that.isSetProjection();
+      if (this_present_projection || that_present_projection) {
+        if (!(this_present_projection && that_present_projection))
           return false;
-        if (!this.projections.equals(that.projections))
+        if (!this.projection.equals(that.projection))
           return false;
       }
 
@@ -472,12 +452,12 @@ public class EventService {
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetProjections()).compareTo(other.isSetProjections());
+      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
       if (lastComparison != 0) {
         return lastComparison;
       }
-      if (isSetProjections()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projections, other.projections);
+      if (isSetProjection()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
         if (lastComparison != 0) {
           return lastComparison;
         }
@@ -502,11 +482,11 @@ public class EventService {
       StringBuilder sb = new StringBuilder("getNextEvent_args(");
       boolean first = true;
 
-      sb.append("projections:");
-      if (this.projections == null) {
+      sb.append("projection:");
+      if (this.projection == null) {
         sb.append("null");
       } else {
-        sb.append(this.projections);
+        sb.append(this.projection);
       }
       first = false;
       sb.append(")");
@@ -516,6 +496,9 @@ public class EventService {
     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 {
@@ -552,21 +535,11 @@ public class EventService {
             break;
           }
           switch (schemeField.id) {
-            case 1: // PROJECTIONS
-              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
-                {
-                  org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
-                  struct.projections = new ArrayList<CuratorProjection>(_list16.size);
-                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
-                  {
-                    CuratorProjection _elem18;
-                    _elem18 = new CuratorProjection();
-                    _elem18.read(iprot);
-                    struct.projections.add(_elem18);
-                  }
-                  iprot.readListEnd();
-                }
-                struct.setProjectionsIsSet(true);
+            case 1: // PROJECTION
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.projection = new CuratorProjection();
+                struct.projection.read(iprot);
+                struct.setProjectionIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
@@ -586,16 +559,9 @@ public class EventService {
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.projections != null) {
-          oprot.writeFieldBegin(PROJECTIONS_FIELD_DESC);
-          {
-            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.projections.size()));
-            for (CuratorProjection _iter19 : struct.projections)
-            {
-              _iter19.write(oprot);
-            }
-            oprot.writeListEnd();
-          }
+        if (struct.projection != null) {
+          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
+          struct.projection.write(oprot);
           oprot.writeFieldEnd();
         }
         oprot.writeFieldStop();
@@ -616,18 +582,12 @@ public class EventService {
       public void write(org.apache.thrift.protocol.TProtocol prot, getNextEvent_args struct) throws org.apache.thrift.TException {
         TTupleProtocol oprot = (TTupleProtocol) prot;
         BitSet optionals = new BitSet();
-        if (struct.isSetProjections()) {
+        if (struct.isSetProjection()) {
           optionals.set(0);
         }
         oprot.writeBitSet(optionals, 1);
-        if (struct.isSetProjections()) {
-          {
-            oprot.writeI32(struct.projections.size());
-            for (CuratorProjection _iter20 : struct.projections)
-            {
-              _iter20.write(oprot);
-            }
-          }
+        if (struct.isSetProjection()) {
+          struct.projection.write(oprot);
         }
       }
 
@@ -636,18 +596,9 @@ public class EventService {
         TTupleProtocol iprot = (TTupleProtocol) prot;
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
-          {
-            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.projections = new ArrayList<CuratorProjection>(_list21.size);
-            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
-            {
-              CuratorProjection _elem23;
-              _elem23 = new CuratorProjection();
-              _elem23.read(iprot);
-              struct.projections.add(_elem23);
-            }
-          }
-          struct.setProjectionsIsSet(true);
+          struct.projection = new CuratorProjection();
+          struct.projection.read(iprot);
+          struct.setProjectionIsSet(true);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/curator/blob/099df94a/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 79cea30..dd1561a 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
@@ -29,7 +29,6 @@ import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
 import org.apache.thrift.transport.TSocket;
-import java.util.Arrays;
 import java.util.concurrent.Executors;
 
 public class TestClient
@@ -62,7 +61,7 @@ public class TestClient
                         //noinspection InfiniteLoopStatement
                         for(;;)
                         {
-                            CuratorEvent nextEvent = serviceClient.getNextEvent(Arrays.asList(curatorProjection));
+                            CuratorEvent nextEvent = serviceClient.getNextEvent(curatorProjection);
                             System.out.println(nextEvent.type);
                         }
                     }


Mime
View raw message