usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [2/2] git commit: Renamed interfaces to be clearer
Date Thu, 05 Dec 2013 17:35:05 GMT
Renamed interfaces to be clearer


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/ce2bfd82
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/ce2bfd82
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/ce2bfd82

Branch: refs/heads/two-point-o-eventbus
Commit: ce2bfd82d2aa4499c994b5f0f792deb1c405845b
Parents: 56c415f
Author: Todd Nine <toddnine@apache.org>
Authored: Thu Dec 5 10:34:53 2013 -0700
Committer: Todd Nine <toddnine@apache.org>
Committed: Thu Dec 5 10:34:53 2013 -0700

----------------------------------------------------------------------
 stack/corepersistence/README.md                 |  4 +-
 stack/corepersistence/collection/pom.xml        |  2 +-
 .../collection/CollectionContext.java           | 27 ------
 .../collection/CollectionManager.java           | 41 ---------
 .../collection/CollectionManagerFactory.java    | 18 ----
 .../collection/EntityCollection.java            | 24 +++++
 .../collection/EntityCollectionManager.java     | 41 +++++++++
 .../EntityCollectionManagerFactory.java         | 18 ++++
 .../collection/guice/CollectionModule.java      | 10 +--
 .../collection/impl/CollectionContextImpl.java  | 95 --------------------
 .../collection/impl/CollectionManagerImpl.java  | 92 -------------------
 .../collection/impl/EntityCollectionImpl.java   | 81 +++++++++++++++++
 .../impl/EntityCollectionManagerImpl.java       | 90 +++++++++++++++++++
 .../collection/mvcc/stage/CollectionEvent.java  | 11 +--
 .../collection/mvcc/stage/ExecutionContext.java |  4 +-
 .../mvcc/stage/impl/delete/Delete.java          |  8 +-
 .../mvcc/stage/impl/delete/DeleteCommit.java    | 16 ++++
 .../mvcc/stage/impl/delete/DeleteStart.java     |  4 +-
 .../mvcc/stage/impl/delete/Deletecommit.java    | 16 ----
 .../mvcc/stage/impl/delete/StartDelete.java     |  8 +-
 .../mvcc/stage/impl/read/EventLoad.java         |  4 +-
 .../collection/mvcc/stage/impl/read/Load.java   |  6 +-
 .../mvcc/stage/impl/write/Commit.java           |  8 +-
 .../mvcc/stage/impl/write/EventCommit.java      |  4 +-
 .../mvcc/stage/impl/write/EventCreate.java      |  4 +-
 .../mvcc/stage/impl/write/EventStart.java       |  4 +-
 .../mvcc/stage/impl/write/EventUpdate.java      |  4 +-
 .../mvcc/stage/impl/write/EventVerify.java      |  4 +-
 .../mvcc/stage/impl/write/StartWrite.java       |  8 +-
 .../MvccEntitySerializationStrategy.java        | 12 +--
 .../MvccLogEntrySerializationStrategy.java      | 10 +--
 .../MvccEntitySerializationStrategyImpl.java    | 15 ++--
 .../MvccLogEntrySerializationStrategyImpl.java  | 15 ++--
 .../collection/CollectionContextImplTest.java   | 17 ++--
 .../CollectionManagerFactoryTest.java           | 52 -----------
 .../collection/CollectionManagerIT.java         | 29 +++---
 .../collection/CollectionManagerTest.java       | 66 --------------
 .../EntityCollectionManagerFactoryTest.java     | 52 +++++++++++
 .../collection/EntityCollectionManagerTest.java | 53 +++++++++++
 .../mvcc/entity/impl/MvccLogEntryImplTest.java  | 12 ---
 .../mvcc/stage/impl/write/CreateTest.java       |  7 +-
 .../mvcc/stage/impl/write/StartWriteTest.java   |  8 +-
 .../mvcc/stage/impl/write/UpdateTest.java       |  6 +-
 ...MvccEntitySerializationStrategyImplTest.java | 26 +++---
 ...ccLogEntrySerializationStrategyImplTest.java | 28 +++---
 .../persistence/index/QueryEngineFactory.java   |  4 +-
 46 files changed, 507 insertions(+), 561 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/README.md
----------------------------------------------------------------------
diff --git a/stack/corepersistence/README.md b/stack/corepersistence/README.md
index 5f9a44b..e238630 100644
--- a/stack/corepersistence/README.md
+++ b/stack/corepersistence/README.md
@@ -13,7 +13,7 @@ Below are the basic data templates this system should support
 Collections
 -----------
 
-A collection storage and indexing framework.  Properties should be secondary indexed, and should be able to be queried efficiently.
+A entityCollection storage and indexing framework.  Properties should be secondary indexed, and should be able to be queried efficiently.
 
 
 *MVCC Semantics*
@@ -34,7 +34,7 @@ Possible ability to define an operation context where a set of all writes must e
 Graphs
 -----------
 
-A system for creating relationships between collection entities.  The directed edges can be named (a type) and
+A system for creating relationships between entityCollection entities.  The directed edges can be named (a type) and
 an index query can be executed on those edges.
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 0f4eb6d..eb9daa7 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -8,7 +8,7 @@
     <version>1.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <description>The module for handling all collection I/O</description>
+  <description>The module for handling all entityCollection I/O</description>
   <properties>
     <guice.version>3.0</guice.version>
   </properties>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionContext.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionContext.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionContext.java
deleted file mode 100644
index fc8c56f..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionContext.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.apache.usergrid.persistence.collection;
-
-
-import java.util.UUID;
-
-
-/**
- * A context to use when creating the collection manager.  Typically, this would be something like an application, or an
- * organization.  Some context that "owns" the collection
- */
-public interface CollectionContext {
-
-    /** @return The application that will contain this collection */
-    public UUID getApplication();
-
-    /**
-     * @return A uuid that is unique to this context.  It can be any uuid (time uuid preferred).  Usually an application
-     *         Id, but could be an entity Id that is the parent of another collection
-     */
-    public UUID getOwner();
-
-    /** @return The name of the collection. If you use pluralization for you names vs types,
-     * you must keep the consistent or you will be unable to load data
-     * @return
-     */
-    public String getName();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManager.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManager.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManager.java
deleted file mode 100644
index 53c14d6..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManager.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.usergrid.persistence.collection;
-
-
-import java.util.UUID;
-
-import org.apache.usergrid.persistence.model.entity.Entity;
-
-
-/**
- *
- *
- * @author: tnine
- *
- */
-public interface CollectionManager
-{
-
-    /**
-     * Create the entity in the collection.  Only use for entities your are sure are new.
-     *
-     * @param entity The entity to update
-     */
-    public Entity create( Entity entity );
-
-    /**
-     * Update the entity with the given fields.
-     *
-     * @param entity The entity properties to update
-     */
-    public Entity update( Entity entity );
-
-    /** Delete the entity and remove it's indexes with the given entity id */
-    public void delete( UUID entityId );
-
-    /**
-     * Load the entity with the given entity Id
-     * @param entityId
-     * @return
-     */
-    public Entity load(UUID entityId);
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManagerFactory.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManagerFactory.java
deleted file mode 100644
index 7791a0b..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/CollectionManagerFactory.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.apache.usergrid.persistence.collection;
-
-
-/** A basic factory that creates a collection manager with the given context */
-public interface CollectionManagerFactory
-{
-
-    /**
-     * Create a new CollectionManager for the given context. The CollectionManager can safely be used on the current
-     * thread and will cache responses.  The returned instance should not be shared among threads it will not be
-     * guaranteed to be thread safe
-     *
-     * @param context The context to use when creating the collection manager
-     *
-     * @return The collection manager to perform operations within the provided context
-     */
-    public CollectionManager createCollectionManager( CollectionContext context );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollection.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollection.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollection.java
new file mode 100644
index 0000000..afeb99e
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollection.java
@@ -0,0 +1,24 @@
+package org.apache.usergrid.persistence.collection;
+
+
+import java.util.UUID;
+
+
+/**
+ * A context to use when creating the collection manager.  Typically, this would be something like an application, or an
+ * organization.  Some context that "owns" the collection
+ */
+public interface EntityCollection {
+
+    /**
+     * @return A uuid that is unique to this context.  It can be any uuid (time uuid preferred).  Usually an application
+     *         Id, but could be an entity Id that is the parent of another collection
+     */
+    public UUID getOwner();
+
+    /** @return The name of the collection. If you use pluralization for you names vs types,
+     * you must keep the consistent or you will be unable to load data
+     * @return
+     */
+    public String getName();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
new file mode 100644
index 0000000..2aac005
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
@@ -0,0 +1,41 @@
+package org.apache.usergrid.persistence.collection;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.model.entity.Entity;
+
+
+/**
+ *
+ *
+ * @author: tnine
+ *
+ */
+public interface EntityCollectionManager
+{
+
+    /**
+     * Create the entity in the collection.  Only use for entities your are sure are new.
+     *
+     * @param entity The entity to update
+     */
+    public Entity create( Entity entity );
+
+    /**
+     * Update the entity with the given fields.
+     *
+     * @param entity The entity properties to update
+     */
+    public Entity update( Entity entity );
+
+    /** Delete the entity and remove it's indexes with the given entity id */
+    public void delete( UUID entityId );
+
+    /**
+     * Load the entity with the given entity Id
+     * @param entityId
+     * @return
+     */
+    public Entity load(UUID entityId);
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactory.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactory.java
new file mode 100644
index 0000000..24a2fdd
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactory.java
@@ -0,0 +1,18 @@
+package org.apache.usergrid.persistence.collection;
+
+
+/** A basic factory that creates a collection manager with the given context */
+public interface EntityCollectionManagerFactory
+{
+
+    /**
+     * Create a new EntityCollectionManager for the given context. The EntityCollectionManager can safely be used on the current
+     * thread and will cache responses.  The returned instance should not be shared among threads it will not be
+     * guaranteed to be thread safe
+     *
+     * @param entityCollection The entityCollection scope to use when creating the entityCollection manager
+     *
+     * @return The entityCollection manager to perform operations within the provided context
+     */
+    public EntityCollectionManager createCollectionManager( EntityCollection entityCollection );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
index 293e79a..41f1128 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
@@ -3,10 +3,10 @@ package org.apache.usergrid.persistence.collection.guice;
 
 import java.util.Properties;
 
-import org.apache.usergrid.persistence.collection.CollectionManager;
-import org.apache.usergrid.persistence.collection.CollectionManagerFactory;
+import org.apache.usergrid.persistence.collection.EntityCollectionManager;
+import org.apache.usergrid.persistence.collection.EntityCollectionManagerFactory;
 import org.apache.usergrid.persistence.collection.astynax.AstynaxKeyspaceProvider;
-import org.apache.usergrid.persistence.collection.impl.CollectionManagerImpl;
+import org.apache.usergrid.persistence.collection.impl.EntityCollectionManagerImpl;
 import org.apache.usergrid.persistence.collection.mvcc.stage.impl.CollectionPipelineModule;
 import org.apache.usergrid.persistence.collection.serialization.impl.SerializationModule;
 import org.apache.usergrid.persistence.collection.service.impl.ServiceModule;
@@ -63,8 +63,8 @@ public class CollectionModule extends AbstractModule {
 
         //create a guice factor for getting our collection manager
         install(new FactoryModuleBuilder()
-             .implement( CollectionManager.class, CollectionManagerImpl.class )
-             .build( CollectionManagerFactory.class ));
+             .implement( EntityCollectionManager.class, EntityCollectionManagerImpl.class )
+             .build( EntityCollectionManagerFactory.class ));
 
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionContextImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionContextImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionContextImpl.java
deleted file mode 100644
index 5f2d334..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionContextImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.apache.usergrid.persistence.collection.impl;
-
-
-import java.util.UUID;
-
-import org.apache.usergrid.persistence.collection.CollectionContext;
-
-import com.google.common.base.Preconditions;
-
-
-/**
- * Simple impl of hte collection context
- * @author tnine
- */
-public class CollectionContextImpl implements CollectionContext {
-
-    private final UUID applicationId;
-    private final UUID ownerId;
-    private final String name;
-
-
-    public CollectionContextImpl( final UUID applicationId, final UUID ownerId, final String name ) {
-        Preconditions.checkNotNull( applicationId , "applicationId is required");
-        Preconditions.checkNotNull( ownerId , "ownerId is required");
-        Preconditions.checkNotNull( name , "name is required");
-        Preconditions.checkArgument( name.length() > 0, "name must have a length" );
-
-
-        this.applicationId = applicationId;
-        this.ownerId = ownerId;
-        this.name = name;
-    }
-
-
-    @Override
-    public UUID getApplication() {
-        return applicationId;
-    }
-
-
-    @Override
-    public UUID getOwner() {
-        return ownerId;
-    }
-
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-
-    @Override
-    public boolean equals( final Object o ) {
-        if ( this == o ) {
-            return true;
-        }
-        if ( o == null || getClass() != o.getClass() ) {
-            return false;
-        }
-
-        final CollectionContextImpl that = ( CollectionContextImpl ) o;
-
-        if ( !applicationId.equals( that.applicationId ) ) {
-            return false;
-        }
-        if ( !name.equals( that.name ) ) {
-            return false;
-        }
-        if ( !ownerId.equals( that.ownerId ) ) {
-            return false;
-        }
-
-        return true;
-    }
-
-
-    @Override
-    public int hashCode() {
-        int result = applicationId.hashCode();
-        result = 31 * result + ownerId.hashCode();
-        result = 31 * result + name.hashCode();
-        return result;
-    }
-
-
-    @Override
-    public String toString() {
-        return "CollectionContextImpl{" +
-                "applicationId=" + applicationId +
-                ", ownerId=" + ownerId +
-                ", name='" + name + '\'' +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionManagerImpl.java
deleted file mode 100644
index 7de8f50..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/CollectionManagerImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.usergrid.persistence.collection.impl;
-
-
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.usergrid.persistence.collection.CollectionContext;
-import org.apache.usergrid.persistence.collection.CollectionManager;
-import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
-import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
-import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
-import org.apache.usergrid.persistence.collection.mvcc.stage.impl.delete.DeleteStart;
-import org.apache.usergrid.persistence.collection.mvcc.stage.impl.read.EventLoad;
-import org.apache.usergrid.persistence.collection.mvcc.stage.impl.write.EventCreate;
-import org.apache.usergrid.persistence.collection.mvcc.stage.impl.write.EventUpdate;
-import org.apache.usergrid.persistence.model.entity.Entity;
-
-import com.google.common.base.Preconditions;
-import com.google.common.eventbus.EventBus;
-import com.google.inject.Inject;
-import com.google.inject.assistedinject.Assisted;
-
-
-/**
- * Simple implementation.  Should perform
- *
- * @author tnine
- */
-public class CollectionManagerImpl implements CollectionManager {
-
-    private static final Logger logger = LoggerFactory.getLogger( CollectionManagerImpl.class );
-
-    private final CollectionContext context;
-    private final CollectionEventBus eventBus;
-
-
-    @Inject
-    public CollectionManagerImpl(  final CollectionEventBus eventBus,
-                                  @Assisted final CollectionContext context ) {
-
-        Preconditions.checkNotNull( eventBus, "eventBus must be defined" );
-        Preconditions.checkNotNull( context, "context must be defined" );
-        this.eventBus = eventBus;
-        this.context = context;
-    }
-
-
-    @Override
-    public Entity create( final Entity entity ) {
-        // Create a new context for the write
-        Result result = new Result();
-
-        eventBus.post( new EventCreate( context, entity, result ) );
-
-        MvccEntity completed = result.getLast( MvccEntity.class );
-
-        return completed.getEntity().get();
-    }
-
-
-    @Override
-    public Entity update( final Entity entity ) {
-        // Create a new context for the write
-        Result result = new Result();
-
-        eventBus.post( new EventUpdate( context, entity, result ) );
-
-        MvccEntity completed = result.getLast( MvccEntity.class );
-
-        return completed.getEntity().get();
-    }
-
-
-    @Override
-    public void delete( final UUID entityId ) {
-        eventBus.post( new DeleteStart( context, entityId, null ) );
-    }
-
-
-    @Override
-    public Entity load( final UUID entityId ) {
-        Result result = new Result();
-
-        eventBus.post( new EventLoad( context, entityId, result ) );
-
-        MvccEntity completed = result.getLast( MvccEntity.class );
-
-        return completed.getEntity().get();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionImpl.java
new file mode 100644
index 0000000..4bbf203
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionImpl.java
@@ -0,0 +1,81 @@
+package org.apache.usergrid.persistence.collection.impl;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.collection.EntityCollection;
+
+import com.google.common.base.Preconditions;
+
+
+/**
+ * Simple impl of hte collection context
+ * @author tnine
+ */
+public class EntityCollectionImpl implements EntityCollection {
+
+    private final UUID ownerId;
+    private final String name;
+
+
+    public EntityCollectionImpl( final UUID ownerId, final String name ) {
+        Preconditions.checkNotNull( ownerId , "ownerId is required");
+        Preconditions.checkNotNull( name , "name is required");
+        Preconditions.checkArgument( name.length() > 0, "name must have a length" );
+
+
+        this.ownerId = ownerId;
+        this.name = name;
+    }
+
+
+    @Override
+    public UUID getOwner() {
+        return ownerId;
+    }
+
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+
+    @Override
+    public boolean equals( final Object o ) {
+        if ( this == o ) {
+            return true;
+        }
+        if ( o == null || getClass() != o.getClass() ) {
+            return false;
+        }
+
+        final EntityCollectionImpl that = ( EntityCollectionImpl ) o;
+
+        if ( !name.equals( that.name ) ) {
+            return false;
+        }
+        if ( !ownerId.equals( that.ownerId ) ) {
+            return false;
+        }
+
+        return true;
+    }
+
+
+    @Override
+    public int hashCode() {
+        int result = 31 * ownerId.hashCode();
+        result = 31 * result + name.hashCode();
+        return result;
+    }
+
+
+    @Override
+    public String toString() {
+        return "EntityCollectionImpl{" +
+                " ownerId=" + ownerId +
+                ", name='" + name + '\'' +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
new file mode 100644
index 0000000..5389687
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@ -0,0 +1,90 @@
+package org.apache.usergrid.persistence.collection.impl;
+
+
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.usergrid.persistence.collection.EntityCollection;
+import org.apache.usergrid.persistence.collection.EntityCollectionManager;
+import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
+import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
+import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
+import org.apache.usergrid.persistence.collection.mvcc.stage.impl.delete.DeleteStart;
+import org.apache.usergrid.persistence.collection.mvcc.stage.impl.read.EventLoad;
+import org.apache.usergrid.persistence.collection.mvcc.stage.impl.write.EventCreate;
+import org.apache.usergrid.persistence.collection.mvcc.stage.impl.write.EventUpdate;
+import org.apache.usergrid.persistence.model.entity.Entity;
+
+import com.google.common.base.Preconditions;
+import com.google.inject.Inject;
+import com.google.inject.assistedinject.Assisted;
+
+
+/**
+ * Simple implementation.  Should perform
+ *
+ * @author tnine
+ */
+public class EntityCollectionManagerImpl implements EntityCollectionManager {
+
+    private static final Logger logger = LoggerFactory.getLogger( EntityCollectionManagerImpl.class );
+
+    private final EntityCollection context;
+    private final CollectionEventBus eventBus;
+
+
+    @Inject
+    public EntityCollectionManagerImpl( final CollectionEventBus eventBus, @Assisted final EntityCollection context ) {
+
+        Preconditions.checkNotNull( eventBus, "eventBus must be defined" );
+        Preconditions.checkNotNull( context, "context must be defined" );
+        this.eventBus = eventBus;
+        this.context = context;
+    }
+
+
+    @Override
+    public Entity create( final Entity entity ) {
+        // Create a new context for the write
+        Result result = new Result();
+
+        eventBus.post( new EventCreate( context, entity, result ) );
+
+        MvccEntity completed = result.getLast( MvccEntity.class );
+
+        return completed.getEntity().get();
+    }
+
+
+    @Override
+    public Entity update( final Entity entity ) {
+        // Create a new context for the write
+        Result result = new Result();
+
+        eventBus.post( new EventUpdate( context, entity, result ) );
+
+        MvccEntity completed = result.getLast( MvccEntity.class );
+
+        return completed.getEntity().get();
+    }
+
+
+    @Override
+    public void delete( final UUID entityId ) {
+        eventBus.post( new DeleteStart( context, entityId, null ) );
+    }
+
+
+    @Override
+    public Entity load( final UUID entityId ) {
+        Result result = new Result();
+
+        eventBus.post( new EventLoad( context, entityId, result ) );
+
+        MvccEntity completed = result.getLast( MvccEntity.class );
+
+        return completed.getEntity().get();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/CollectionEvent.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/CollectionEvent.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/CollectionEvent.java
index 84df2d0..09050a6 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/CollectionEvent.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/CollectionEvent.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 
 import com.google.common.base.Preconditions;
 
@@ -9,15 +9,16 @@ import com.google.common.base.Preconditions;
 /** @author tnine */
 public abstract class CollectionEvent<T> {
 
-    private final CollectionContext context;
+    private final EntityCollection context;
     private final T data;
     private final Result result;
 
 
-    protected CollectionEvent( final CollectionContext context, final T data, final Result result ) {
+    protected CollectionEvent( final EntityCollection context, final T data, final Result result ) {
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( data, "context is required" );
-        Preconditions.checkNotNull( context, "context is required" );
+        Preconditions.checkNotNull( result, "result is required" );
+
         this.context = context;
         this.data = data;
         this.result = result;
@@ -27,7 +28,7 @@ public abstract class CollectionEvent<T> {
 
 
     /** Get the collection context for this event */
-    public CollectionContext getCollectionContext() {
+    public EntityCollection getCollectionContext() {
         return this.context;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/ExecutionContext.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/ExecutionContext.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/ExecutionContext.java
index 0fb9ced..9ecdebb 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/ExecutionContext.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/ExecutionContext.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 
 
 /** @author tnine */
@@ -38,7 +38,7 @@ public interface ExecutionContext {
      * Return the current collection context
      * @return
      */
-    CollectionContext getCollectionContext();
+    EntityCollection getCollectionContext();
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Delete.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Delete.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Delete.java
index feed7fa..21f24e0 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Delete.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Delete.java
@@ -6,7 +6,7 @@ import java.util.UUID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.exception.CollectionRuntimeException;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
@@ -63,16 +63,16 @@ public class Delete implements EventStage<DeleteCommit> {
         Preconditions.checkNotNull( version, "Entity version is required in this stage" );
 
 
-        final CollectionContext collectionContext = event.getCollectionContext();
+        final EntityCollection entityCollection = event.getCollectionContext();
 
 
         final MvccLogEntry startEntry = new MvccLogEntryImpl( entityId, version,
                 org.apache.usergrid.persistence.collection.mvcc.entity.Stage.COMMITTED );
 
-        MutationBatch logMutation = logEntrySerializationStrategy.write( collectionContext, startEntry );
+        MutationBatch logMutation = logEntrySerializationStrategy.write( entityCollection, startEntry );
 
         //insert a "cleared" value into the versions.  Post processing should actually delete
-        MutationBatch entityMutation = entitySerializationStrategy.clear( collectionContext, entityId, version );
+        MutationBatch entityMutation = entitySerializationStrategy.clear( entityCollection, entityId, version );
 
         //merge the 2 into 1 mutation
         logMutation.mergeShallow( entityMutation );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteCommit.java
new file mode 100644
index 0000000..ee0e64c
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteCommit.java
@@ -0,0 +1,16 @@
+package org.apache.usergrid.persistence.collection.mvcc.stage.impl.delete;
+
+
+import org.apache.usergrid.persistence.collection.EntityCollection;
+import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
+import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
+import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
+
+
+/** @author tnine */
+public class DeleteCommit extends CollectionEvent<MvccEntity> {
+    public DeleteCommit( final EntityCollection context, final MvccEntity data, final Result result ) {
+
+        super( context, data, result );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteStart.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteStart.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteStart.java
index 5f8840b..7ccfa51 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteStart.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/DeleteStart.java
@@ -3,7 +3,7 @@ package org.apache.usergrid.persistence.collection.mvcc.stage.impl.delete;
 
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 
@@ -11,7 +11,7 @@ import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 /** @author tnine */
 public class DeleteStart extends CollectionEvent<UUID> {
 
-    public DeleteStart( final CollectionContext context, final UUID data, final Result result ) {
+    public DeleteStart( final EntityCollection context, final UUID data, final Result result ) {
         super( context, data, result );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Deletecommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Deletecommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Deletecommit.java
deleted file mode 100644
index dfdebba..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/Deletecommit.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.usergrid.persistence.collection.mvcc.stage.impl.delete;
-
-
-import org.apache.usergrid.persistence.collection.CollectionContext;
-import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
-import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
-import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
-
-
-/** @author tnine */
-public class DeleteCommit extends CollectionEvent<MvccEntity> {
-    public DeleteCommit( final CollectionContext context, final MvccEntity data, final Result result ) {
-
-        super( context, data, result );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/StartDelete.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/StartDelete.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/StartDelete.java
index ca1865b..ab0fc22 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/StartDelete.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/delete/StartDelete.java
@@ -6,7 +6,7 @@ import java.util.UUID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.exception.CollectionRuntimeException;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
@@ -70,13 +70,13 @@ public class StartDelete implements EventStage<DeleteStart> {
         Preconditions.checkNotNull( version, "Entity version is required in this stage" );
 
 
-        final CollectionContext collectionContext = event.getCollectionContext();
+        final EntityCollection entityCollection = event.getCollectionContext();
 
 
         final MvccLogEntry startEntry = new MvccLogEntryImpl( entityId, version,
                 org.apache.usergrid.persistence.collection.mvcc.entity.Stage.ACTIVE );
 
-        MutationBatch write = logStrategy.write( collectionContext, startEntry );
+        MutationBatch write = logStrategy.write( entityCollection, startEntry );
 
 
         try {
@@ -91,6 +91,6 @@ public class StartDelete implements EventStage<DeleteStart> {
         //create the mvcc entity for the next stage
         final MvccEntityImpl nextStage = new MvccEntityImpl( entityId, version, Optional.<Entity>absent() );
 
-        eventBus.post( new DeleteCommit( collectionContext, nextStage, event.getResult() ) );
+        eventBus.post( new DeleteCommit( entityCollection, nextStage, event.getResult() ) );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/EventLoad.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/EventLoad.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/EventLoad.java
index 6f3fab9..e3fa151 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/EventLoad.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/EventLoad.java
@@ -3,14 +3,14 @@ package org.apache.usergrid.persistence.collection.mvcc.stage.impl.read;
 
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 
 
 /** @author tnine */
 public class EventLoad extends CollectionEvent<UUID> {
-    public EventLoad( final CollectionContext context, final UUID data, final Result result ) {
+    public EventLoad( final EntityCollection context, final UUID data, final Result result ) {
 
         super( context, data, result );
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/Load.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/Load.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/Load.java
index a2acf3e..fce75d6 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/Load.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/read/Load.java
@@ -7,7 +7,7 @@ import java.util.UUID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
 import org.apache.usergrid.persistence.collection.mvcc.stage.EventStage;
@@ -51,12 +51,12 @@ public class Load implements EventStage<EventLoad> {
         Preconditions.checkNotNull( entityId, "Entity id required in the read stage" );
 
 
-        final CollectionContext collectionContext = event.getCollectionContext();
+        final EntityCollection entityCollection = event.getCollectionContext();
 
         //generate  a version that represents now
         final UUID versionMax = uuidService.newTimeUUID();
 
-        List<MvccEntity> results = entitySerializationStrategy.load( collectionContext, entityId, versionMax, 1 );
+        List<MvccEntity> results = entitySerializationStrategy.load( entityCollection, entityId, versionMax, 1 );
 
         //nothing to do, we didn't get a result back
         if ( results.size() != 1 ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/Commit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/Commit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/Commit.java
index 65af8cf..fa14213 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/Commit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/Commit.java
@@ -6,7 +6,7 @@ import java.util.UUID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.exception.CollectionRuntimeException;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
@@ -60,16 +60,16 @@ public class Commit implements EventStage<EventCommit> {
         Preconditions.checkNotNull( version, "Entity version is required in this stage" );
 
 
-        final CollectionContext collectionContext = event.getCollectionContext();
+        final EntityCollection entityCollection = event.getCollectionContext();
 
 
         final MvccLogEntry startEntry = new MvccLogEntryImpl( entityId, version,
                 org.apache.usergrid.persistence.collection.mvcc.entity.Stage.COMMITTED );
 
-        MutationBatch logMutation = logEntrySerializationStrategy.write( collectionContext, startEntry );
+        MutationBatch logMutation = logEntrySerializationStrategy.write( entityCollection, startEntry );
 
         //now get our actual insert into the entity data
-        MutationBatch entityMutation = entitySerializationStrategy.write( collectionContext, entity );
+        MutationBatch entityMutation = entitySerializationStrategy.write( entityCollection, entity );
 
         //merge the 2 into 1 mutation
         logMutation.mergeShallow( entityMutation );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCommit.java
index 0091770..7263049 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCommit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCommit.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage.impl.write;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
@@ -10,7 +10,7 @@ import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 public class EventCommit extends CollectionEvent<MvccEntity> {
 
 
-    protected EventCommit( final CollectionContext context, final MvccEntity data, final Result result ) {
+    protected EventCommit( final EntityCollection context, final MvccEntity data, final Result result ) {
         super( context, data, result );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCreate.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCreate.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCreate.java
index d5a609f..a106117 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCreate.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventCreate.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage.impl.write;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 import org.apache.usergrid.persistence.model.entity.Entity;
@@ -11,7 +11,7 @@ import org.apache.usergrid.persistence.model.entity.Entity;
 public class EventCreate extends CollectionEvent<Entity> {
 
 
-    public EventCreate( final CollectionContext context, final Entity data, final Result result ) {
+    public EventCreate( final EntityCollection context, final Entity data, final Result result ) {
         super( context, data, result );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventStart.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventStart.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventStart.java
index 87e2488..d803870 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventStart.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventStart.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage.impl.write;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 import org.apache.usergrid.persistence.model.entity.Entity;
@@ -10,7 +10,7 @@ import org.apache.usergrid.persistence.model.entity.Entity;
 /** @author tnine */
 public class EventStart extends CollectionEvent<Entity> {
 
-    public EventStart( final CollectionContext context, final Entity data, final Result result ) {
+    public EventStart( final EntityCollection context, final Entity data, final Result result ) {
 
         super( context, data, result );
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventUpdate.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventUpdate.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventUpdate.java
index 68fb6ab..5a43713 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventUpdate.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventUpdate.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage.impl.write;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 import org.apache.usergrid.persistence.model.entity.Entity;
@@ -10,7 +10,7 @@ import org.apache.usergrid.persistence.model.entity.Entity;
 /** @author tnine */
 public class EventUpdate extends CollectionEvent<Entity> {
 
-    public EventUpdate( final CollectionContext context, final Entity data, final Result result ) {
+    public EventUpdate( final EntityCollection context, final Entity data, final Result result ) {
         super( context, data, result );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventVerify.java
index f078aa5..3409b14 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/EventVerify.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.collection.mvcc.stage.impl.write;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionEvent;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
@@ -11,7 +11,7 @@ import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
 public class EventVerify extends CollectionEvent<MvccEntity> {
 
 
-    public EventVerify( final CollectionContext context, final MvccEntity data, final Result result ) {
+    public EventVerify( final EntityCollection context, final MvccEntity data, final Result result ) {
         super( context, data, result );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWrite.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWrite.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWrite.java
index ac153f8..0476db8 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWrite.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWrite.java
@@ -6,7 +6,7 @@ import java.util.UUID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.exception.CollectionRuntimeException;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
@@ -65,13 +65,13 @@ public class StartWrite implements EventStage<EventStart> {
         Preconditions.checkNotNull( version, "Entity version is required in this stage" );
 
 
-        final CollectionContext collectionContext = event.getCollectionContext();
+        final EntityCollection entityCollection = event.getCollectionContext();
 
 
         final MvccLogEntry startEntry = new MvccLogEntryImpl( entityId, version,
                 org.apache.usergrid.persistence.collection.mvcc.entity.Stage.ACTIVE );
 
-        MutationBatch write = logStrategy.write( collectionContext, startEntry );
+        MutationBatch write = logStrategy.write( entityCollection, startEntry );
 
 
         try {
@@ -86,7 +86,7 @@ public class StartWrite implements EventStage<EventStart> {
         //create the mvcc entity for the next stage
         final MvccEntityImpl nextStage = new MvccEntityImpl( entityId, version, entity );
 
-        eventBus.post( new EventVerify( collectionContext, nextStage, event.getResult() ) );
+        eventBus.post( new EventVerify( entityCollection, nextStage, event.getResult() ) );
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccEntitySerializationStrategy.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccEntitySerializationStrategy.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccEntitySerializationStrategy.java
index b873fb6..85dfcd3 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccEntitySerializationStrategy.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccEntitySerializationStrategy.java
@@ -4,7 +4,7 @@ package org.apache.usergrid.persistence.collection.serialization;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
 
 import com.netflix.astyanax.MutationBatch;
@@ -20,7 +20,7 @@ public interface MvccEntitySerializationStrategy
      * @param entity The entity to persist
      * @return The MutationBatch operations for this update
      */
-    public MutationBatch write(CollectionContext context, MvccEntity entity );
+    public MutationBatch write(EntityCollection context, MvccEntity entity );
 
 
     /**
@@ -34,7 +34,7 @@ public interface MvccEntitySerializationStrategy
      * If the entity version has been cleared, the MvccEntity will be returned, but the optional entity
      * will not be set
      */
-    public MvccEntity load( CollectionContext context, UUID entityId, UUID version );
+    public MvccEntity load( EntityCollection context, UUID entityId, UUID version );
 
     /**
      * Load a list, from highest to lowest of the entity with versions <= version up to maxSize elements
@@ -47,7 +47,7 @@ public interface MvccEntitySerializationStrategy
      * @return A list of entities up to max size ordered from max(UUID)=> min(UUID).  The return value should be null safe
      * and return an empty list when there are no matches
      */
-    public List<MvccEntity> load( CollectionContext context, UUID entityId, UUID version, int maxSize );
+    public List<MvccEntity> load( EntityCollection context, UUID entityId, UUID version, int maxSize );
 
 
     /**
@@ -60,7 +60,7 @@ public interface MvccEntitySerializationStrategy
      * @param version
      * @return
      */
-    public MutationBatch clear(CollectionContext context, UUID entityId, UUID version);
+    public MutationBatch clear(EntityCollection context, UUID entityId, UUID version);
 
 
     /**
@@ -70,7 +70,7 @@ public interface MvccEntitySerializationStrategy
      * @param entityId The entity id to delete
      * @param version The version to delete
      */
-    public MutationBatch delete( CollectionContext context, UUID entityId, UUID version );
+    public MutationBatch delete( EntityCollection context, UUID entityId, UUID version );
 
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccLogEntrySerializationStrategy.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccLogEntrySerializationStrategy.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccLogEntrySerializationStrategy.java
index e79e95f..6e2b812 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccLogEntrySerializationStrategy.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/MvccLogEntrySerializationStrategy.java
@@ -4,7 +4,7 @@ package org.apache.usergrid.persistence.collection.serialization;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
 
 import com.netflix.astyanax.MutationBatch;
@@ -21,7 +21,7 @@ public interface MvccLogEntrySerializationStrategy
      * @param entry the entry to write
      * @return The mutation batch with the mutation operations for this write.
      */
-    public MutationBatch write( final CollectionContext context, MvccLogEntry entry );
+    public MutationBatch write( final EntityCollection context, MvccLogEntry entry );
 
     /**
      * Load and return the stage with the given id and a version that is <= the version provided
@@ -33,7 +33,7 @@ public interface MvccLogEntrySerializationStrategy
      *
      * @return The deserialized version of the log entry.  Null if no version == the current version exists
      */
-    public MvccLogEntry load( final CollectionContext context, final UUID entityId, final UUID version )
+    public MvccLogEntry load( final EntityCollection context, final UUID entityId, final UUID version )
             throws ConnectionException;
 
     /**
@@ -46,7 +46,7 @@ public interface MvccLogEntrySerializationStrategy
      *
      * @return A list of entities up to max size ordered from max(UUID)=> min(UUID)
      */
-    public List<MvccLogEntry> load( CollectionContext context, UUID entityId, UUID version, int maxSize )
+    public List<MvccLogEntry> load( EntityCollection context, UUID entityId, UUID version, int maxSize )
             throws ConnectionException;
 
     /**
@@ -56,5 +56,5 @@ public interface MvccLogEntrySerializationStrategy
      * @param entityId The entity id to delete
      * @param version The version to delete
      */
-    public MutationBatch delete( CollectionContext context, UUID entityId, UUID version );
+    public MutationBatch delete( EntityCollection context, UUID entityId, UUID version );
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
index 7a5c5c5..3b66ad9 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
@@ -3,7 +3,6 @@ package org.apache.usergrid.persistence.collection.serialization.impl;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.UUID;
@@ -11,7 +10,7 @@ import java.util.UUID;
 import org.apache.cassandra.db.marshal.ReversedType;
 import org.apache.cassandra.db.marshal.UUIDType;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.exception.CollectionRuntimeException;
 import org.apache.usergrid.persistence.collection.migration.CollectionColumnFamily;
 import org.apache.usergrid.persistence.collection.migration.Migration;
@@ -60,7 +59,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
 
 
     @Override
-    public MutationBatch write(final CollectionContext context, final MvccEntity entity ) {
+    public MutationBatch write(final EntityCollection context, final MvccEntity entity ) {
         Preconditions.checkNotNull( entity, "entity is required" );
 
         final UUID colName = entity.getVersion();
@@ -78,7 +77,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
 
 
     @Override
-    public MvccEntity load( final CollectionContext context, final UUID entityId, final UUID version ) {
+    public MvccEntity load( final EntityCollection context, final UUID entityId, final UUID version ) {
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
         Preconditions.checkNotNull( version, "version is required" );
@@ -105,7 +104,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
 
 
     @Override
-    public List<MvccEntity> load( final CollectionContext context, final UUID entityId, final UUID version,
+    public List<MvccEntity> load( final EntityCollection context, final UUID entityId, final UUID version,
                                   final int maxSize ) {
 
         Preconditions.checkNotNull( context, "context is required" );
@@ -135,7 +134,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
 
 
     @Override
-    public MutationBatch clear( final CollectionContext context, final UUID entityId, final UUID version ) {
+    public MutationBatch clear( final EntityCollection context, final UUID entityId, final UUID version ) {
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
         Preconditions.checkNotNull( version, "version is required" );
@@ -152,7 +151,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
 
 
     @Override
-    public MutationBatch delete( final CollectionContext context, final UUID entityId, final UUID version ) {
+    public MutationBatch delete( final EntityCollection context, final UUID entityId, final UUID version ) {
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
         Preconditions.checkNotNull( version, "version is required" );
@@ -168,7 +167,7 @@ public class MvccEntitySerializationStrategyImpl implements MvccEntitySerializat
 
 
     @Override
-    public Collection<CollectionColumnFamily> getColumnFamilies() {
+    public java.util.Collection getColumnFamilies() {
 
         //create the CF entity data.  We want it reversed b/c we want the most recent version at the top of the
         //row for fast seeks

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImpl.java
index d4663b9..f80306b 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImpl.java
@@ -3,7 +3,6 @@ package org.apache.usergrid.persistence.collection.serialization.impl;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -13,7 +12,7 @@ import java.util.UUID;
 import org.apache.cassandra.db.marshal.ReversedType;
 import org.apache.cassandra.db.marshal.UUIDType;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.migration.CollectionColumnFamily;
 import org.apache.usergrid.persistence.collection.migration.Migration;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
@@ -65,7 +64,7 @@ public class MvccLogEntrySerializationStrategyImpl implements MvccLogEntrySerial
 
 
     @Override
-    public MutationBatch write( final CollectionContext context, final MvccLogEntry entry ) {
+    public MutationBatch write( final EntityCollection context, final MvccLogEntry entry ) {
 
         Preconditions.checkNotNull( entry, "entry is required" );
 
@@ -91,7 +90,7 @@ public class MvccLogEntrySerializationStrategyImpl implements MvccLogEntrySerial
 
 
     @Override
-    public MvccLogEntry load( final CollectionContext context, final UUID entityId, final UUID version )
+    public MvccLogEntry load( final EntityCollection context, final UUID entityId, final UUID version )
             throws ConnectionException {
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
@@ -116,7 +115,7 @@ public class MvccLogEntrySerializationStrategyImpl implements MvccLogEntrySerial
 
 
     @Override
-    public List<MvccLogEntry> load( final CollectionContext context, final UUID entityId, final UUID version,
+    public List<MvccLogEntry> load( final EntityCollection context, final UUID entityId, final UUID version,
                                     final int maxSize ) throws ConnectionException {
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
@@ -142,7 +141,7 @@ public class MvccLogEntrySerializationStrategyImpl implements MvccLogEntrySerial
 
 
     @Override
-    public MutationBatch delete( final CollectionContext context, final UUID entityId, final UUID version ) {
+    public MutationBatch delete( final EntityCollection context, final UUID entityId, final UUID version ) {
 
         Preconditions.checkNotNull( context, "context is required" );
         Preconditions.checkNotNull( entityId, "entityId is required" );
@@ -158,7 +157,7 @@ public class MvccLogEntrySerializationStrategyImpl implements MvccLogEntrySerial
 
 
     @Override
-    public Collection<CollectionColumnFamily> getColumnFamilies() {
+    public java.util.Collection getColumnFamilies() {
         //create the CF entity data.  We want it reversed b/c we want the most recent version at the top of the
         //row for fast seeks
         CollectionColumnFamily cf = new CollectionColumnFamily( CF_ENTITY_LOG,
@@ -182,7 +181,7 @@ public class MvccLogEntrySerializationStrategyImpl implements MvccLogEntrySerial
      *
      * @param context We need to use this when getting the keyspace
      */
-    private MutationBatch doWrite( CollectionContext context, UUID entityId, RowOp op ) {
+    private MutationBatch doWrite( EntityCollection context, UUID entityId, RowOp op ) {
 
         final MutationBatch batch = keyspace.prepareMutationBatch();
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionContextImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionContextImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionContextImplTest.java
index dd7770a..a6ca549 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionContextImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionContextImplTest.java
@@ -5,7 +5,7 @@ import java.util.UUID;
 
 import org.junit.Test;
 
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
+import org.apache.usergrid.persistence.collection.impl.EntityCollectionImpl;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 
 import static junit.framework.TestCase.assertEquals;
@@ -14,40 +14,33 @@ import static junit.framework.TestCase.assertEquals;
 /** @author tnine */
 public class CollectionContextImplTest {
 
-    @Test( expected = NullPointerException.class )
-    public void appIdRequired() {
-        new CollectionContextImpl( null, UUIDGenerator.newTimeUUID(), "test" );
-    }
-
 
     @Test( expected = NullPointerException.class )
     public void ownerIdRequired() {
-        new CollectionContextImpl( UUIDGenerator.newTimeUUID(), null, "test" );
+        new EntityCollectionImpl( null, "test" );
     }
 
 
     @Test( expected = NullPointerException.class )
     public void collectionRequired() {
-        new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), null );
+        new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), null );
     }
 
 
     @Test( expected = IllegalArgumentException.class )
     public void collectionRequiredLength() {
-        new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "" );
+        new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "" );
     }
 
 
     @Test
     public void correctValues() {
-        final UUID appId = UUIDGenerator.newTimeUUID();
         final UUID ownerId = UUIDGenerator.newTimeUUID();
 
         final String collection = "tests";
 
-        CollectionContextImpl context = new CollectionContextImpl( appId, ownerId, collection );
+        EntityCollectionImpl context = new EntityCollectionImpl(ownerId, collection );
 
-        assertEquals( appId, context.getApplication() );
         assertEquals( ownerId, context.getOwner() );
         assertEquals( collection, context.getName() );
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerFactoryTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerFactoryTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerFactoryTest.java
deleted file mode 100644
index 355cd09..0000000
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerFactoryTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.usergrid.persistence.collection;
-
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.usergrid.persistence.collection.guice.TestCollectionModule;
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
-import org.apache.usergrid.persistence.model.util.UUIDGenerator;
-
-import com.google.guiceberry.junit4.GuiceBerryRule;
-import com.google.inject.Inject;
-import com.google.inject.ProvisionException;
-
-import static org.junit.Assert.assertNotNull;
-
-
-/**
- * Basic tests
- *
- * @author tnine
- */
-public class CollectionManagerFactoryTest {
-
-
-    @Rule
-    public final GuiceBerryRule guiceBerry = new GuiceBerryRule( TestCollectionModule.class );
-
-
-    @Inject
-    private CollectionManagerFactory collectionManagerFactory;
-
-
-
-
-    @Test
-    public void validInput() {
-
-        CollectionContextImpl context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "test" );
-
-        CollectionManager collectionManager = collectionManagerFactory.createCollectionManager( context );
-
-        assertNotNull( "A collection manager must be returned", collectionManager );
-    }
-
-
-    @Test( expected = ProvisionException.class )
-    public void nullInput() {
-           CollectionManager collectionManager = collectionManagerFactory.createCollectionManager( null );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerIT.java
index a9dd579..2723645 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerIT.java
@@ -5,8 +5,7 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import org.apache.usergrid.persistence.collection.guice.CassandraTestCollectionModule;
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
-import org.apache.usergrid.persistence.collection.mvcc.stage.impl.write.EventCreate;
+import org.apache.usergrid.persistence.collection.impl.EntityCollectionImpl;
 import org.apache.usergrid.persistence.model.entity.Entity;
 import org.apache.usergrid.persistence.model.field.IntegerField;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
@@ -34,7 +33,7 @@ public class CollectionManagerIT {
 
 
     @Inject
-    private CollectionManagerFactory factory;
+    private EntityCollectionManagerFactory factory;
 
     @Inject
     private EventBus eventBus;
@@ -43,11 +42,11 @@ public class CollectionManagerIT {
     @Test
     public void create() {
 
-        CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "test" );
+        EntityCollection context =
+                new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" );
         Entity newEntity = new Entity( "test" );
 
-        CollectionManager manager = factory.createCollectionManager( context );
+        EntityCollectionManager manager = factory.createCollectionManager( context );
 
         Entity returned = manager.create( newEntity );
 
@@ -62,11 +61,11 @@ public class CollectionManagerIT {
     @Test
     public void createAndLoad() {
 
-        CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "test" );
+        EntityCollection context =
+                new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" );
         Entity newEntity = new Entity( "test" );
 
-        CollectionManager manager = factory.createCollectionManager( context );
+        EntityCollectionManager manager = factory.createCollectionManager( context );
 
         Entity createReturned = manager.create( newEntity );
 
@@ -82,11 +81,11 @@ public class CollectionManagerIT {
     @Test
     public void createLoadDelete() {
 
-        CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "test" );
+        EntityCollection context =
+                new EntityCollectionImpl(  UUIDGenerator.newTimeUUID(), "test" );
         Entity newEntity = new Entity( "test" );
 
-        CollectionManager manager = factory.createCollectionManager( context );
+        EntityCollectionManager manager = factory.createCollectionManager( context );
 
         Entity createReturned = manager.create( newEntity );
 
@@ -108,13 +107,13 @@ public class CollectionManagerIT {
     @Test
     public void createLoadUpdateLoad() {
 
-        CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "test" );
+        EntityCollection context =
+                new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" );
 
         Entity newEntity = new Entity( "test" );
         newEntity.setField( new IntegerField( "counter", 1 ) );
 
-        CollectionManager manager = factory.createCollectionManager( context );
+        EntityCollectionManager manager = factory.createCollectionManager( context );
 
         Entity createReturned = manager.create( newEntity );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerTest.java
deleted file mode 100644
index e3bb133..0000000
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/CollectionManagerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.apache.usergrid.persistence.collection;
-
-
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
-import org.apache.usergrid.persistence.collection.impl.CollectionManagerImpl;
-import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
-import org.apache.usergrid.persistence.collection.mvcc.stage.ExecutionContext;
-import org.apache.usergrid.persistence.collection.mvcc.stage.EventStage;
-import org.apache.usergrid.persistence.collection.mvcc.stage.StagePipeline;
-import org.apache.usergrid.persistence.model.entity.Entity;
-import org.apache.usergrid.persistence.model.util.UUIDGenerator;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-
-/** @author tnine */
-public class CollectionManagerTest {
-//
-//    @Test
-//    public void create(){
-//
-//        EventStage mockEventStage = mock(EventStage.class);
-//
-//        StagePipeline createPipeline = mock(StagePipeline.class);
-//        StagePipeline updatePipeline = mock(StagePipeline.class);
-//        StagePipeline deletePipeline = mock(StagePipeline.class);
-//        StagePipeline loadPipeline = mock(StagePipeline.class);
-//
-//
-//
-//        //mock up returning the first stage
-//        when(createPipeline.first()).thenReturn( mockEventStage );
-//
-//
-//        CollectionContext context = new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), "test" );
-//
-//        CollectionManager collectionManager = new CollectionManagerImpl(createPipeline, updatePipeline, deletePipeline, loadPipeline, context);
-//
-//        Entity create = new Entity();
-//
-//        MvccEntity mvccEntity = mock(MvccEntity.class);
-//
-//
-//        Entity returned = collectionManager.create( create );
-//
-//        //verify the first stage was asked for
-//        verify(createPipeline).first();
-//
-//        ArgumentCaptor<ExecutionContext> contextArg = ArgumentCaptor.forClass(ExecutionContext.class);
-//
-//        //verify the first perform stage was invoked
-//        verify( mockEventStage ).performStage( contextArg.capture() );
-//
-//        //verify we set the passed entity into the ExecutionContext
-//        assertEquals("Entity should be present in the write context", create, contextArg.getValue().getMessage( Entity.class ));
-//
-//    }
-}


Mime
View raw message