You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/03/27 14:01:45 UTC

[1/6] incubator-tinkerpop git commit: Renamed GraphChangedListener to MutationListener.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 11e15de26 -> 1b37172d5


Renamed GraphChangedListener to MutationListener.


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

Branch: refs/heads/master
Commit: 4599dfb8805abc3a5c0713aa28118bded47bad91
Parents: 11e15de
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 07:52:53 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 07:52:53 2015 -0400

----------------------------------------------------------------------
 .../util/event/ConsoleGraphChangedListener.java |  89 ---------------
 .../util/event/ConsoleMutationListener.java     |  89 +++++++++++++++
 .../step/util/event/EdgeAddedEvent.java         |   2 +-
 .../util/event/EdgePropertyChangedEvent.java    |   2 +-
 .../util/event/EdgePropertyRemovedEvent.java    |   2 +-
 .../step/util/event/EdgeRemovedEvent.java       |   3 +-
 .../step/util/event/ElementPropertyEvent.java   |   4 +-
 .../traversal/step/util/event/Event.java        |   2 +-
 .../step/util/event/GraphChangedListener.java   | 111 -------------------
 .../step/util/event/MutationListener.java       | 111 +++++++++++++++++++
 .../step/util/event/VertexAddedEvent.java       |   2 +-
 .../util/event/VertexPropertyChangedEvent.java  |   2 +-
 .../VertexPropertyPropertyChangedEvent.java     |   2 +-
 .../VertexPropertyPropertyRemovedEvent.java     |   2 +-
 .../util/event/VertexPropertyRemovedEvent.java  |   2 +-
 .../step/util/event/VertexRemovedEvent.java     |   3 +-
 .../strategy/decoration/EventStrategy.java      |  18 +--
 .../strategy/decoration/EventStrategyTest.java  |   6 +-
 .../decoration/EventStrategyProcessTest.java    |  60 +++++-----
 19 files changed, 252 insertions(+), 260 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleGraphChangedListener.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleGraphChangedListener.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleGraphChangedListener.java
deleted file mode 100644
index ab0888c..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleGraphChangedListener.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-
-/**
- * An example listener that writes a message to the console for each event that fires from the graph.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class ConsoleGraphChangedListener implements GraphChangedListener {
-
-    private final Graph graph;
-
-    public ConsoleGraphChangedListener(final Graph graph) {
-        this.graph = graph;
-    }
-
-    @Override
-    public void vertexAdded(final Vertex vertex) {
-        System.out.println("Vertex [" + vertex.toString() + "] added to graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void vertexRemoved(final Vertex vertex) {
-        System.out.println("Vertex [" + vertex.toString() + "] removed from graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void vertexPropertyRemoved(final VertexProperty vertexProperty) {
-        System.out.println("Vertex Property [" + vertexProperty.toString() + "] removed from graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void edgeAdded(final Edge edge) {
-        System.out.println("Edge [" + edge.toString() + "] added to graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void edgeRemoved(final Edge edge) {
-        System.out.println("Edge [" + edge.toString() + "] removed from graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void edgePropertyRemoved(final Edge element, final Property removedValue) {
-        System.out.println("Edge [" + element.toString() + "] property with value of [" + removedValue + "] removed in graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void edgePropertyChanged(final Edge element, final Property oldValue, final Object setValue) {
-        System.out.println("Edge [" + element.toString() + "] property change value from [" + oldValue + "] to [" + setValue + "] in graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void vertexPropertyPropertyChanged(final VertexProperty element, final Property oldValue, final Object setValue) {
-        System.out.println("VertexProperty [" + element.toString() + "] property change value from [" + oldValue + "] to [" + setValue + "] in graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void vertexPropertyPropertyRemoved(final VertexProperty element, final Property oldValue) {
-        System.out.println("VertexProperty [" + element.toString() + "] property with value of [" + oldValue + "] removed in graph [" + graph.toString() + "]");
-    }
-
-    @Override
-    public void vertexPropertyChanged(final Vertex element, final Property oldValue, final Object setValue, final Object... vertexPropertyKeyValues) {
-        System.out.println("Vertex [" + element.toString() + "] property [" + oldValue + "] change to [" + setValue + "] in graph [" + graph.toString() + "]");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
new file mode 100644
index 0000000..a454d46
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
+
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+
+/**
+ * An example listener that writes a message to the console for each event that fires from the graph.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ConsoleMutationListener implements MutationListener {
+
+    private final Graph graph;
+
+    public ConsoleMutationListener(final Graph graph) {
+        this.graph = graph;
+    }
+
+    @Override
+    public void vertexAdded(final Vertex vertex) {
+        System.out.println("Vertex [" + vertex.toString() + "] added to graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void vertexRemoved(final Vertex vertex) {
+        System.out.println("Vertex [" + vertex.toString() + "] removed from graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void vertexPropertyRemoved(final VertexProperty vertexProperty) {
+        System.out.println("Vertex Property [" + vertexProperty.toString() + "] removed from graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void edgeAdded(final Edge edge) {
+        System.out.println("Edge [" + edge.toString() + "] added to graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void edgeRemoved(final Edge edge) {
+        System.out.println("Edge [" + edge.toString() + "] removed from graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void edgePropertyRemoved(final Edge element, final Property removedValue) {
+        System.out.println("Edge [" + element.toString() + "] property with value of [" + removedValue + "] removed in graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void edgePropertyChanged(final Edge element, final Property oldValue, final Object setValue) {
+        System.out.println("Edge [" + element.toString() + "] property change value from [" + oldValue + "] to [" + setValue + "] in graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void vertexPropertyPropertyChanged(final VertexProperty element, final Property oldValue, final Object setValue) {
+        System.out.println("VertexProperty [" + element.toString() + "] property change value from [" + oldValue + "] to [" + setValue + "] in graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void vertexPropertyPropertyRemoved(final VertexProperty element, final Property oldValue) {
+        System.out.println("VertexProperty [" + element.toString() + "] property with value of [" + oldValue + "] removed in graph [" + graph.toString() + "]");
+    }
+
+    @Override
+    public void vertexPropertyChanged(final Vertex element, final Property oldValue, final Object setValue, final Object... vertexPropertyKeyValues) {
+        System.out.println("Vertex [" + element.toString() + "] property [" + oldValue + "] change to [" + setValue + "] in graph [" + graph.toString() + "]");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
index aecc110..3011806 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
@@ -34,7 +34,7 @@ public class EdgeAddedEvent implements Event {
     }
 
     @Override
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners) {
+    public void fireEvent(final Iterator<MutationListener> eventListeners) {
         while (eventListeners.hasNext()) {
             eventListeners.next().edgeAdded(edge);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
index c5c36b6..210f939 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
@@ -32,7 +32,7 @@ public class EdgePropertyChangedEvent extends ElementPropertyChangedEvent {
     }
 
     @Override
-    void fire(final GraphChangedListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
         listener.edgePropertyChanged((Edge) element, oldValue, newValue);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
index e8769fc..c82cf6b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
@@ -34,7 +34,7 @@ public class EdgePropertyRemovedEvent extends ElementPropertyEvent {
     }
 
     @Override
-    void fire(final GraphChangedListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
         listener.edgePropertyRemoved((Edge) element, oldValue);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
index 6ba442a..74c0b7e 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
@@ -21,7 +21,6 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 
 import java.util.Iterator;
-import java.util.Map;
 
 /**
  * Event fired when an edge is removed.
@@ -37,7 +36,7 @@ public class EdgeRemovedEvent implements Event {
     }
 
     @Override
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners) {
+    public void fireEvent(final Iterator<MutationListener> eventListeners) {
         while (eventListeners.hasNext()) {
             eventListeners.next().edgeRemoved(edge);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
index de3cbb9..8bab91c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
@@ -40,10 +40,10 @@ public abstract class ElementPropertyEvent implements Event {
         this.vertexPropertyKeyValues = vertexPropertyKeyValues;
     }
 
-    abstract void fire(final GraphChangedListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues);
+    abstract void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues);
 
     @Override
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners) {
+    public void fireEvent(final Iterator<MutationListener> eventListeners) {
         while (eventListeners.hasNext()) {
             fire(eventListeners.next(), element, oldValue, newValue, vertexPropertyKeyValues);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
index 24c54c5..0bbb053 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
@@ -25,6 +25,6 @@ import java.util.Iterator;
  */
 public interface Event {
 
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners);
+    public void fireEvent(final Iterator<MutationListener> eventListeners);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/GraphChangedListener.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/GraphChangedListener.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/GraphChangedListener.java
deleted file mode 100644
index 2c51990..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/GraphChangedListener.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-
-/**
- * Interface for a listener to {@link org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategy}
- * change events.
- *
- * Implementations of this interface should be added to the list of listeners on the addListener method on
- * the {@link org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategy}.
- *
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public interface GraphChangedListener {
-
-    /**
-     * Raised when a new {@link Vertex} is added.
-     *
-     * @param vertex the {@link Vertex} that was added
-     */
-    public void vertexAdded(final Vertex vertex);
-
-    /**
-     * Raised after a {@link Vertex} was removed from the graph.
-     *
-     * @param vertex the {@link Vertex} that was removed
-     */
-    public void vertexRemoved(final Vertex vertex);
-
-    /**
-     * Raised after the property of a {@link Vertex} changed.
-     *
-     * @param element  the {@link Vertex} that changed
-     * @param setValue the new value of the property
-     */
-    public void vertexPropertyChanged(final Vertex element, final Property oldValue, final Object setValue, final Object... vertexPropertyKeyValues);
-
-    /**
-     * Raised after a {@link VertexProperty} was removed from the graph.
-     *
-     * @param vertexProperty the {@link VertexProperty} that was removed
-     */
-    public void vertexPropertyRemoved(final VertexProperty vertexProperty);
-
-    /**
-     * Raised after a new {@link Edge} is added.
-     *
-     * @param edge the {@link Edge} that was added
-     */
-    public void edgeAdded(final Edge edge);
-
-    /**
-     * Raised after an {@link Edge} was removed from the graph.
-     *
-     * @param edge  the {@link Edge} that was removed.
-     */
-    public void edgeRemoved(final Edge edge);
-
-    /**
-     * Raised after the property of a {@link Edge} changed.
-     *
-     * @param element  the {@link Edge} that changed
-     * @param setValue the new value of the property
-     */
-    public void edgePropertyChanged(final Edge element, final Property oldValue, final Object setValue);
-
-    /**
-     * Raised after an {@link Property} property was removed from an {@link Edge}.
-     *
-     * @param property  the {@link Property} that was removed
-     */
-    public void edgePropertyRemoved(final Edge element, final Property property);
-
-    /**
-     * Raised after the property of a {@link VertexProperty} changed.
-     *
-     * @param element  the {@link VertexProperty} that changed
-     * @param setValue the new value of the property
-     */
-    public void vertexPropertyPropertyChanged(final VertexProperty element, final Property oldValue, final Object setValue);
-
-    /**
-     * Raised after an {@link Property} property was removed from a {@link VertexProperty}.
-     *
-     * @param property  the {@link Property} that removed
-     */
-    public void vertexPropertyPropertyRemoved(final VertexProperty element, final Property property);
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/MutationListener.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/MutationListener.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/MutationListener.java
new file mode 100644
index 0000000..422074c
--- /dev/null
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/MutationListener.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
+
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+
+/**
+ * Interface for a listener to {@link org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategy}
+ * change events.
+ *
+ * Implementations of this interface should be added to the list of listeners on the addListener method on
+ * the {@link org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategy}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public interface MutationListener {
+
+    /**
+     * Raised when a new {@link Vertex} is added.
+     *
+     * @param vertex the {@link Vertex} that was added
+     */
+    public void vertexAdded(final Vertex vertex);
+
+    /**
+     * Raised after a {@link Vertex} was removed from the graph.
+     *
+     * @param vertex the {@link Vertex} that was removed
+     */
+    public void vertexRemoved(final Vertex vertex);
+
+    /**
+     * Raised after the property of a {@link Vertex} changed.
+     *
+     * @param element  the {@link Vertex} that changed
+     * @param setValue the new value of the property
+     */
+    public void vertexPropertyChanged(final Vertex element, final Property oldValue, final Object setValue, final Object... vertexPropertyKeyValues);
+
+    /**
+     * Raised after a {@link VertexProperty} was removed from the graph.
+     *
+     * @param vertexProperty the {@link VertexProperty} that was removed
+     */
+    public void vertexPropertyRemoved(final VertexProperty vertexProperty);
+
+    /**
+     * Raised after a new {@link Edge} is added.
+     *
+     * @param edge the {@link Edge} that was added
+     */
+    public void edgeAdded(final Edge edge);
+
+    /**
+     * Raised after an {@link Edge} was removed from the graph.
+     *
+     * @param edge  the {@link Edge} that was removed.
+     */
+    public void edgeRemoved(final Edge edge);
+
+    /**
+     * Raised after the property of a {@link Edge} changed.
+     *
+     * @param element  the {@link Edge} that changed
+     * @param setValue the new value of the property
+     */
+    public void edgePropertyChanged(final Edge element, final Property oldValue, final Object setValue);
+
+    /**
+     * Raised after an {@link Property} property was removed from an {@link Edge}.
+     *
+     * @param property  the {@link Property} that was removed
+     */
+    public void edgePropertyRemoved(final Edge element, final Property property);
+
+    /**
+     * Raised after the property of a {@link VertexProperty} changed.
+     *
+     * @param element  the {@link VertexProperty} that changed
+     * @param setValue the new value of the property
+     */
+    public void vertexPropertyPropertyChanged(final VertexProperty element, final Property oldValue, final Object setValue);
+
+    /**
+     * Raised after an {@link Property} property was removed from a {@link VertexProperty}.
+     *
+     * @param property  the {@link Property} that removed
+     */
+    public void vertexPropertyPropertyRemoved(final VertexProperty element, final Property property);
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
index 4e5917b..aa2dbdc 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
@@ -34,7 +34,7 @@ public class VertexAddedEvent implements Event {
     }
 
     @Override
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners) {
+    public void fireEvent(final Iterator<MutationListener> eventListeners) {
         while (eventListeners.hasNext()) {
             eventListeners.next().vertexAdded(vertex);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
index 0084fec..caf96c4 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
@@ -32,7 +32,7 @@ public class VertexPropertyChangedEvent extends ElementPropertyChangedEvent {
     }
 
     @Override
-    void fire(final GraphChangedListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
         listener.vertexPropertyChanged((Vertex) element, oldValue, newValue, vertexPropertyKeyValues);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
index 6b9b712..633f01b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
@@ -32,7 +32,7 @@ public class VertexPropertyPropertyChangedEvent extends ElementPropertyChangedEv
     }
 
     @Override
-    void fire(final GraphChangedListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
         listener.vertexPropertyPropertyChanged((VertexProperty) element, oldValue, newValue);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
index 31f7ae3..e7efec7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
@@ -32,7 +32,7 @@ public class VertexPropertyPropertyRemovedEvent extends ElementPropertyEvent {
     }
 
     @Override
-    void fire(final GraphChangedListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
         listener.vertexPropertyPropertyRemoved((VertexProperty) element, oldValue);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
index 8ffdef4..0282a1b 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
@@ -34,7 +34,7 @@ public class VertexPropertyRemovedEvent implements Event {
     }
 
     @Override
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners) {
+    public void fireEvent(final Iterator<MutationListener> eventListeners) {
         while (eventListeners.hasNext()) {
             eventListeners.next().vertexPropertyRemoved(vertexProperty);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
index 2d691f8..067ab0c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
@@ -21,7 +21,6 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 
 import java.util.Iterator;
-import java.util.Map;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -35,7 +34,7 @@ public class VertexRemovedEvent implements Event {
     }
 
     @Override
-    public void fireEvent(final Iterator<GraphChangedListener> eventListeners) {
+    public void fireEvent(final Iterator<MutationListener> eventListeners) {
         while (eventListeners.hasNext()) {
             eventListeners.next().vertexRemoved(vertex);
         }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategy.java
index 22b1345..1843190 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategy.java
@@ -20,15 +20,9 @@ package org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration;
 
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeByPathStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep;
-import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AddPropertyStep;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.GraphChangedListener;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.MutationListener;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -51,9 +45,9 @@ import java.util.List;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class EventStrategy extends AbstractTraversalStrategy {
-    private final List<GraphChangedListener> listeners = new ArrayList<>();
+    private final List<MutationListener> listeners = new ArrayList<>();
 
-    private EventStrategy(final GraphChangedListener... listeners) {
+    private EventStrategy(final MutationListener... listeners) {
         this.listeners.addAll(Arrays.asList(listeners));
     }
 
@@ -86,17 +80,17 @@ public class EventStrategy extends AbstractTraversalStrategy {
     }
 
     public static class Builder {
-        private final List<GraphChangedListener> listeners = new ArrayList<>();
+        private final List<MutationListener> listeners = new ArrayList<>();
 
         Builder() {}
 
-        public Builder addListener(GraphChangedListener listener) {
+        public Builder addListener(MutationListener listener) {
             this.listeners.add(listener);
             return this;
         }
 
         public EventStrategy create() {
-            return new EventStrategy(this.listeners.toArray(new GraphChangedListener[this.listeners.size()]));
+            return new EventStrategy(this.listeners.toArray(new MutationListener[this.listeners.size()]));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
index ece5d2c..9ab7251 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyTest.java
@@ -21,8 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.ConsoleGraphChangedListener;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.GraphChangedListener;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.ConsoleMutationListener;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.MutationListener;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
 import org.junit.Test;
@@ -73,7 +73,7 @@ public class EventStrategyTest {
 
     @Test
     public void shouldEventOnMutatingSteps() {
-        final GraphChangedListener listener1 = new ConsoleGraphChangedListener(EmptyGraph.instance());
+        final MutationListener listener1 = new ConsoleMutationListener(EmptyGraph.instance());
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1).create();
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4599dfb8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
index 62d7c97..2103582 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategyProcessTest.java
@@ -24,7 +24,7 @@ import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
 import org.apache.tinkerpop.gremlin.process.UseEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.GraphChangedListener;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.MutationListener;
 import org.apache.tinkerpop.gremlin.structure.Compare;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -50,8 +50,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerAddVertex() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -68,8 +68,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerAddVertexFromStart() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -86,8 +86,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldTriggerAddEdge() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -110,8 +110,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldTriggerAddEdgeByPath() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -134,8 +134,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerAddVertexPropertyAdded() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -156,8 +156,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerAddVertexPropertyChanged() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -180,8 +180,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
     public void shouldTriggerAddVertexPropertyPropertyChanged() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -203,8 +203,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldTriggerAddEdgePropertyAdded() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -231,8 +231,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldTriggerEdgePropertyChanged() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -259,8 +259,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerRemoveVertex() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -278,8 +278,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerRemoveEdge() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -298,8 +298,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     public void shouldTriggerRemoveVertexProperty() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -317,8 +317,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @Test
     @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
     public void shouldTriggerRemoveEdgeProperty() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -338,8 +338,8 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
     @FeatureRequirementSet(FeatureRequirementSet.Package.VERTICES_ONLY)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
     public void shouldTriggerAddVertexPropertyPropertyRemoved() {
-        final StubGraphChangedListener listener1 = new StubGraphChangedListener();
-        final StubGraphChangedListener listener2 = new StubGraphChangedListener();
+        final StubMutationListener listener1 = new StubMutationListener();
+        final StubMutationListener listener2 = new StubMutationListener();
         final EventStrategy eventStrategy = EventStrategy.build()
                 .addListener(listener1)
                 .addListener(listener2).create();
@@ -365,7 +365,7 @@ public class EventStrategyProcessTest extends AbstractGremlinProcessTest {
         return graphProvider.traversal(graph, strategy);
     }
 
-    public static class StubGraphChangedListener implements GraphChangedListener {
+    public static class StubMutationListener implements MutationListener {
         private final AtomicLong addEdgeEvent = new AtomicLong(0);
         private final AtomicLong addVertexEvent = new AtomicLong(0);
         private final AtomicLong vertexRemovedEvent = new AtomicLong(0);


[5/6] incubator-tinkerpop git commit: Add toString() for nicer output in console on the ConsoleMutationListener.

Posted by sp...@apache.org.
Add toString() for nicer output in console on the ConsoleMutationListener.


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

Branch: refs/heads/master
Commit: cada5f388c11c4837f2eca84abb9ba8a9fba401e
Parents: ea51641
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 08:42:29 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 08:42:29 2015 -0400

----------------------------------------------------------------------
 .../traversal/step/util/event/ConsoleMutationListener.java      | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cada5f38/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
index a454d46..a45b195 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ConsoleMutationListener.java
@@ -86,4 +86,9 @@ public class ConsoleMutationListener implements MutationListener {
     public void vertexPropertyChanged(final Vertex element, final Property oldValue, final Object setValue, final Object... vertexPropertyKeyValues) {
         System.out.println("Vertex [" + element.toString() + "] property [" + oldValue + "] change to [" + setValue + "] in graph [" + graph.toString() + "]");
     }
+
+    @Override
+    public String toString() {
+        return MutationListener.class.getSimpleName() + "[" + graph + "]";
+    }
 }


[2/6] incubator-tinkerpop git commit: Moved all Event implementations to the Event interface.

Posted by sp...@apache.org.
Moved all Event implementations to the Event interface.


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

Branch: refs/heads/master
Commit: 010fee5f4db4e82679e0fb20761624685f9ac51d
Parents: 4599dfb
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 08:06:34 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 08:06:34 2015 -0400

----------------------------------------------------------------------
 .../process/traversal/step/filter/DropStep.java |  18 +-
 .../traversal/step/map/AddEdgeByPathStep.java   |  14 +-
 .../process/traversal/step/map/AddEdgeStep.java |  15 +-
 .../traversal/step/map/AddVertexStartStep.java  |  14 +-
 .../traversal/step/map/AddVertexStep.java       |  14 +-
 .../step/sideEffect/AddPropertyStep.java        |  23 +-
 .../step/util/event/EdgeAddedEvent.java         |  42 ----
 .../util/event/EdgePropertyChangedEvent.java    |  38 ----
 .../util/event/EdgePropertyRemovedEvent.java    |  40 ----
 .../step/util/event/EdgeRemovedEvent.java       |  44 ----
 .../util/event/ElementPropertyChangedEvent.java |  32 ---
 .../step/util/event/ElementPropertyEvent.java   |  51 -----
 .../traversal/step/util/event/Event.java        | 222 ++++++++++++++++++-
 .../step/util/event/VertexAddedEvent.java       |  42 ----
 .../util/event/VertexPropertyChangedEvent.java  |  38 ----
 .../VertexPropertyPropertyChangedEvent.java     |  38 ----
 .../VertexPropertyPropertyRemovedEvent.java     |  38 ----
 .../util/event/VertexPropertyRemovedEvent.java  |  42 ----
 .../step/util/event/VertexRemovedEvent.java     |  42 ----
 19 files changed, 265 insertions(+), 542 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DropStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DropStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DropStep.java
index 1da4f90..0a5b730 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DropStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/DropStep.java
@@ -21,14 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.filter;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EdgePropertyRemovedEvent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EdgeRemovedEvent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.ElementPropertyEvent;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexPropertyPropertyRemovedEvent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexPropertyRemovedEvent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexRemovedEvent;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Element;
 import org.apache.tinkerpop.gremlin.structure.Property;
@@ -60,11 +54,11 @@ public final class DropStep<S> extends FilterStep<S> implements Mutating<EventCa
             if (callbacks != null) {
                 final Event removeEvent;
                 if (s instanceof Vertex)
-                    removeEvent = new VertexRemovedEvent(DetachedFactory.detach((Vertex) s, true));
+                    removeEvent = new Event.VertexRemovedEvent(DetachedFactory.detach((Vertex) s, true));
                 else if (s instanceof Edge)
-                    removeEvent = new EdgeRemovedEvent(DetachedFactory.detach((Edge) s, true));
+                    removeEvent = new Event.EdgeRemovedEvent(DetachedFactory.detach((Edge) s, true));
                 else if (s instanceof VertexProperty)
-                    removeEvent = new VertexPropertyRemovedEvent(DetachedFactory.detach((VertexProperty) s, true));
+                    removeEvent = new Event.VertexPropertyRemovedEvent(DetachedFactory.detach((VertexProperty) s, true));
                 else
                     throw new IllegalStateException("The incoming object is not removable: " + s);
 
@@ -75,11 +69,11 @@ public final class DropStep<S> extends FilterStep<S> implements Mutating<EventCa
         } else if (s instanceof Property) {
             final Property toRemove = ((Property) s);
             if (callbacks != null) {
-                final ElementPropertyEvent removeEvent;
+                final Event.ElementPropertyEvent removeEvent;
                 if (toRemove.element() instanceof Edge)
-                    removeEvent = new EdgePropertyRemovedEvent((Edge) toRemove.element(), DetachedFactory.detach(toRemove));
+                    removeEvent = new Event.EdgePropertyRemovedEvent((Edge) toRemove.element(), DetachedFactory.detach(toRemove));
                 else if (toRemove.element() instanceof VertexProperty)
-                    removeEvent = new VertexPropertyPropertyRemovedEvent((VertexProperty) toRemove.element(), DetachedFactory.detach(toRemove));
+                    removeEvent = new Event.VertexPropertyPropertyRemovedEvent((VertexProperty) toRemove.element(), DetachedFactory.detach(toRemove));
                 else
                     throw new IllegalStateException("The incoming object is not removable: " + s);
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeByPathStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeByPathStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeByPathStep.java
index 1e8a86b..f92f2f3 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeByPathStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeByPathStep.java
@@ -21,7 +21,7 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EdgeAddedEvent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
@@ -40,14 +40,14 @@ import java.util.Set;
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-public final class AddEdgeByPathStep extends MapStep<Vertex, Edge> implements Mutating<EventCallback<EdgeAddedEvent>> {
+public final class AddEdgeByPathStep extends MapStep<Vertex, Edge> implements Mutating<EventCallback<Event.EdgeAddedEvent>> {
 
     private static final Set<TraverserRequirement> REQUIREMENTS = EnumSet.of(
             TraverserRequirement.PATH,
             TraverserRequirement.OBJECT
     );
 
-    private List<EventCallback<EdgeAddedEvent>> callbacks = null;
+    private List<EventCallback<Event.EdgeAddedEvent>> callbacks = null;
 
     // TODO: Weight key based on Traverser.getCount() ?
 
@@ -99,7 +99,7 @@ public final class AddEdgeByPathStep extends MapStep<Vertex, Edge> implements Mu
             e = currentVertex.addEdge(this.edgeLabel, otherVertex, this.keyValues);
 
         if (callbacks != null) {
-            final EdgeAddedEvent vae = new EdgeAddedEvent(DetachedFactory.detach(e, true));
+            final Event.EdgeAddedEvent vae = new Event.EdgeAddedEvent(DetachedFactory.detach(e, true));
             callbacks.forEach(c -> c.accept(vae));
         }
 
@@ -112,13 +112,13 @@ public final class AddEdgeByPathStep extends MapStep<Vertex, Edge> implements Mu
     }
 
     @Override
-    public void addCallback(final EventCallback<EdgeAddedEvent> edgeAddedEventEventCallback) {
+    public void addCallback(final EventCallback<Event.EdgeAddedEvent> edgeAddedEventEventCallback) {
         if (callbacks == null) callbacks = new ArrayList<>();
         callbacks.add(edgeAddedEventEventCallback);
     }
 
     @Override
-    public void removeCallback(final EventCallback<EdgeAddedEvent> edgeAddedEventEventCallback) {
+    public void removeCallback(final EventCallback<Event.EdgeAddedEvent> edgeAddedEventEventCallback) {
         if (callbacks != null) callbacks.remove(edgeAddedEventEventCallback);
     }
 
@@ -128,7 +128,7 @@ public final class AddEdgeByPathStep extends MapStep<Vertex, Edge> implements Mu
     }
 
     @Override
-    public List<EventCallback<EdgeAddedEvent>> getCallbacks() {
+    public List<EventCallback<Event.EdgeAddedEvent>> getCallbacks() {
         return (callbacks != null) ? Collections.unmodifiableList(callbacks) : Collections.emptyList();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
index 7ddcf0b..d3c72ac 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddEdgeStep.java
@@ -21,9 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EdgeAddedEvent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexAddedEvent;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
@@ -42,7 +41,7 @@ import java.util.Set;
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-public final class AddEdgeStep extends FlatMapStep<Vertex, Edge> implements Mutating<EventCallback<EdgeAddedEvent>> {
+public final class AddEdgeStep extends FlatMapStep<Vertex, Edge> implements Mutating<EventCallback<Event.EdgeAddedEvent>> {
 
     private static final Set<TraverserRequirement> REQUIREMENTS = EnumSet.of(TraverserRequirement.OBJECT);
 
@@ -51,7 +50,7 @@ public final class AddEdgeStep extends FlatMapStep<Vertex, Edge> implements Muta
     private final List<Vertex> vertices;
     private final Direction direction;
 
-    private List<EventCallback<EdgeAddedEvent>> callbacks = null;
+    private List<EventCallback<Event.EdgeAddedEvent>> callbacks = null;
 
     public AddEdgeStep(final Traversal.Admin traversal, final Direction direction, final String edgeLabel, final Vertex vertex, final Object... keyValues) {
         this(traversal, direction, edgeLabel, IteratorUtils.of(vertex), keyValues);
@@ -89,7 +88,7 @@ public final class AddEdgeStep extends FlatMapStep<Vertex, Edge> implements Muta
                     vertex.addEdge(this.edgeLabel, traverser.get(), this.keyValues);
 
             if (callbacks != null) {
-                final EdgeAddedEvent vae = new EdgeAddedEvent(DetachedFactory.detach(e, true));
+                final Event.EdgeAddedEvent vae = new Event.EdgeAddedEvent(DetachedFactory.detach(e, true));
                 callbacks.forEach(c -> c.accept(vae));
             }
 
@@ -103,13 +102,13 @@ public final class AddEdgeStep extends FlatMapStep<Vertex, Edge> implements Muta
     }
 
     @Override
-    public void addCallback(final EventCallback<EdgeAddedEvent> edgeAddedEventEventCallback) {
+    public void addCallback(final EventCallback<Event.EdgeAddedEvent> edgeAddedEventEventCallback) {
         if (callbacks == null) callbacks = new ArrayList<>();
         callbacks.add(edgeAddedEventEventCallback);
     }
 
     @Override
-    public void removeCallback(final EventCallback<EdgeAddedEvent> edgeAddedEventEventCallback) {
+    public void removeCallback(final EventCallback<Event.EdgeAddedEvent> edgeAddedEventEventCallback) {
         if (callbacks != null) callbacks.remove(edgeAddedEventEventCallback);
     }
 
@@ -119,7 +118,7 @@ public final class AddEdgeStep extends FlatMapStep<Vertex, Edge> implements Muta
     }
 
     @Override
-    public List<EventCallback<EdgeAddedEvent>> getCallbacks() {
+    public List<EventCallback<Event.EdgeAddedEvent>> getCallbacks() {
         return (callbacks != null) ? Collections.unmodifiableList(callbacks) : Collections.emptyList();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
index 92dadb0..5a2fa0d 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStartStep.java
@@ -23,8 +23,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexAddedEvent;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
 
@@ -36,11 +36,11 @@ import java.util.List;
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-public final class AddVertexStartStep extends AbstractStep<Vertex, Vertex> implements Mutating<EventCallback<VertexAddedEvent>> {
+public final class AddVertexStartStep extends AbstractStep<Vertex, Vertex> implements Mutating<EventCallback<Event.VertexAddedEvent>> {
 
     private final Object[] keyValues;
     private boolean first = true;
-    private List<EventCallback<VertexAddedEvent>> callbacks = null;
+    private List<EventCallback<Event.VertexAddedEvent>> callbacks = null;
 
     public AddVertexStartStep(final Traversal.Admin traversal, final Object... keyValues) {
         super(traversal);
@@ -57,7 +57,7 @@ public final class AddVertexStartStep extends AbstractStep<Vertex, Vertex> imple
             this.first = false;
             final Vertex v = this.getTraversal().getGraph().get().addVertex(this.keyValues);
             if (callbacks != null) {
-                final VertexAddedEvent vae = new VertexAddedEvent(DetachedFactory.detach(v, true));
+                final Event.VertexAddedEvent vae = new Event.VertexAddedEvent(DetachedFactory.detach(v, true));
                 callbacks.forEach(c -> c.accept(vae));
             }
 
@@ -67,13 +67,13 @@ public final class AddVertexStartStep extends AbstractStep<Vertex, Vertex> imple
     }
 
     @Override
-    public void addCallback(final EventCallback<VertexAddedEvent> vertexAddedEventEventCallback) {
+    public void addCallback(final EventCallback<Event.VertexAddedEvent> vertexAddedEventEventCallback) {
         if (callbacks == null) callbacks = new ArrayList<>();
         callbacks.add(vertexAddedEventEventCallback);
     }
 
     @Override
-    public void removeCallback(final EventCallback<VertexAddedEvent> vertexAddedEventEventCallback) {
+    public void removeCallback(final EventCallback<Event.VertexAddedEvent> vertexAddedEventEventCallback) {
         if (callbacks != null) callbacks.remove(vertexAddedEventEventCallback);
     }
 
@@ -83,7 +83,7 @@ public final class AddVertexStartStep extends AbstractStep<Vertex, Vertex> imple
     }
 
     @Override
-    public List<EventCallback<VertexAddedEvent>> getCallbacks() {
+    public List<EventCallback<Event.VertexAddedEvent>> getCallbacks() {
         return (callbacks != null) ? Collections.unmodifiableList(callbacks) : Collections.emptyList();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java
index 8e05471..2e5d335 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexStep.java
@@ -21,8 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexAddedEvent;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
@@ -35,12 +35,12 @@ import java.util.List;
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
-public final class AddVertexStep<S> extends MapStep<S, Vertex> implements Mutating<EventCallback<VertexAddedEvent>> {
+public final class AddVertexStep<S> extends MapStep<S, Vertex> implements Mutating<EventCallback<Event.VertexAddedEvent>> {
 
     private final Object[] keyValues;
     private final transient Graph graph;
 
-    private List<EventCallback<VertexAddedEvent>> callbacks = null;
+    private List<EventCallback<Event.VertexAddedEvent>> callbacks = null;
 
     public AddVertexStep(final Traversal.Admin traversal, final Object... keyValues) {
         super(traversal);
@@ -56,20 +56,20 @@ public final class AddVertexStep<S> extends MapStep<S, Vertex> implements Mutati
     protected Vertex map(final Traverser.Admin<S> traverser) {
         final Vertex v = this.graph.addVertex(this.keyValues);
         if (callbacks != null) {
-            final VertexAddedEvent vae = new VertexAddedEvent(DetachedFactory.detach(v, true));
+            final Event.VertexAddedEvent vae = new Event.VertexAddedEvent(DetachedFactory.detach(v, true));
             callbacks.forEach(c -> c.accept(vae));
         }
         return v;
     }
 
     @Override
-    public void addCallback(final EventCallback<VertexAddedEvent> vertexAddedEventEventCallback) {
+    public void addCallback(final EventCallback<Event.VertexAddedEvent> vertexAddedEventEventCallback) {
         if (callbacks == null) callbacks = new ArrayList<>();
         callbacks.add(vertexAddedEventEventCallback);
     }
 
     @Override
-    public void removeCallback(final EventCallback<VertexAddedEvent> vertexAddedEventEventCallback) {
+    public void removeCallback(final EventCallback<Event.VertexAddedEvent> vertexAddedEventEventCallback) {
         if (callbacks != null) callbacks.remove(vertexAddedEventEventCallback);
     }
 
@@ -79,7 +79,7 @@ public final class AddVertexStep<S> extends MapStep<S, Vertex> implements Mutati
     }
 
     @Override
-    public List<EventCallback<VertexAddedEvent>> getCallbacks() {
+    public List<EventCallback<Event.VertexAddedEvent>> getCallbacks() {
         return (callbacks != null) ? Collections.unmodifiableList(callbacks) : Collections.emptyList();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
index 2d98738..cbb5e27 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStep.java
@@ -21,11 +21,8 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Mutating;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EdgePropertyChangedEvent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.ElementPropertyChangedEvent;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventCallback;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexPropertyChangedEvent;
-import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.VertexPropertyPropertyChangedEvent;
 import org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Element;
@@ -43,7 +40,7 @@ import java.util.Set;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public final class AddPropertyStep<S extends Element> extends SideEffectStep<S> implements Mutating<EventCallback<ElementPropertyChangedEvent>> {
+public final class AddPropertyStep<S extends Element> extends SideEffectStep<S> implements Mutating<EventCallback<Event.ElementPropertyChangedEvent>> {
 
     private static final Set<TraverserRequirement> REQUIREMENTS = EnumSet.of(TraverserRequirement.OBJECT);
 
@@ -52,7 +49,7 @@ public final class AddPropertyStep<S extends Element> extends SideEffectStep<S>
     private final Object value;
     private final Object[] vertexPropertyKeyValues;
     private final boolean asVertex;
-    private List<EventCallback<ElementPropertyChangedEvent>> callbacks = null;
+    private List<EventCallback<Event.ElementPropertyChangedEvent>> callbacks = null;
 
     public AddPropertyStep(final Traversal.Admin traversal, final VertexProperty.Cardinality cardinality, final String key, final Object value, final Object... vertexPropertyKeyValues) {
         super(traversal);
@@ -74,13 +71,13 @@ public final class AddPropertyStep<S extends Element> extends SideEffectStep<S>
             final Property currentProperty = traverser.get().property(key);
             final boolean newProperty = asVertex ? currentProperty == VertexProperty.empty() : currentProperty == Property.empty();
 
-            ElementPropertyChangedEvent evt;
+            Event.ElementPropertyChangedEvent evt;
             if (currentElement instanceof Vertex)
-                evt = new VertexPropertyChangedEvent(DetachedFactory.detach((Vertex) currentElement, true), newProperty ? null : DetachedFactory.detach((VertexProperty) currentProperty, true), value, vertexPropertyKeyValues);
+                evt = new Event.VertexPropertyChangedEvent(DetachedFactory.detach((Vertex) currentElement, true), newProperty ? null : DetachedFactory.detach((VertexProperty) currentProperty, true), value, vertexPropertyKeyValues);
             else if (currentElement instanceof Edge)
-                evt = new EdgePropertyChangedEvent(DetachedFactory.detach((Edge) currentElement, true), newProperty ? null : DetachedFactory.detach(currentProperty), value);
+                evt = new Event.EdgePropertyChangedEvent(DetachedFactory.detach((Edge) currentElement, true), newProperty ? null : DetachedFactory.detach(currentProperty), value);
             else if (currentElement instanceof VertexProperty)
-                evt = new VertexPropertyPropertyChangedEvent(DetachedFactory.detach((VertexProperty) currentElement, true), newProperty ? null : DetachedFactory.detach(currentProperty), value);
+                evt = new Event.VertexPropertyPropertyChangedEvent(DetachedFactory.detach((VertexProperty) currentElement, true), newProperty ? null : DetachedFactory.detach(currentProperty), value);
             else
                 throw new IllegalStateException(String.format("The incoming object cannot be processed by change eventing in %s:  %s", AddPropertyStep.class.getName(), currentElement));
 
@@ -100,13 +97,13 @@ public final class AddPropertyStep<S extends Element> extends SideEffectStep<S>
 
 
     @Override
-    public void addCallback(final EventCallback<ElementPropertyChangedEvent> elementPropertyChangedEventCallback) {
+    public void addCallback(final EventCallback<Event.ElementPropertyChangedEvent> elementPropertyChangedEventCallback) {
         if (callbacks == null) callbacks = new ArrayList<>();
         callbacks.add(elementPropertyChangedEventCallback);
     }
 
     @Override
-    public void removeCallback(final EventCallback<ElementPropertyChangedEvent> elementPropertyChangedEventCallback) {
+    public void removeCallback(final EventCallback<Event.ElementPropertyChangedEvent> elementPropertyChangedEventCallback) {
         if (callbacks != null) callbacks.remove(elementPropertyChangedEventCallback);
     }
 
@@ -116,7 +113,7 @@ public final class AddPropertyStep<S extends Element> extends SideEffectStep<S>
     }
 
     @Override
-    public List<EventCallback<ElementPropertyChangedEvent>> getCallbacks() {
+    public List<EventCallback<Event.ElementPropertyChangedEvent>> getCallbacks() {
         return (callbacks != null) ? Collections.unmodifiableList(callbacks) : Collections.emptyList();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
deleted file mode 100644
index 3011806..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeAddedEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Edge;
-
-import java.util.Iterator;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class EdgeAddedEvent implements Event {
-
-    private final Edge edge;
-
-    public EdgeAddedEvent(final Edge edge) {
-        this.edge = edge;
-    }
-
-    @Override
-    public void fireEvent(final Iterator<MutationListener> eventListeners) {
-        while (eventListeners.hasNext()) {
-            eventListeners.next().edgeAdded(edge);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
deleted file mode 100644
index 210f939..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyChangedEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class EdgePropertyChangedEvent extends ElementPropertyChangedEvent {
-
-    public EdgePropertyChangedEvent(final Edge edge, final Property oldValue, final Object newValue) {
-        super(edge, oldValue, newValue);
-    }
-
-    @Override
-    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        listener.edgePropertyChanged((Edge) element, oldValue, newValue);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
deleted file mode 100644
index c82cf6b..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgePropertyRemovedEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-
-/**
- * Event fired when an edge property is removed.
- *
- * @author Stephen Mallette
- */
-public class EdgePropertyRemovedEvent extends ElementPropertyEvent {
-
-    public EdgePropertyRemovedEvent(final Edge element, final Property removed) {
-        super(element, removed, null);
-    }
-
-    @Override
-    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        listener.edgePropertyRemoved((Edge) element, oldValue);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
deleted file mode 100644
index 74c0b7e..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EdgeRemovedEvent.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Edge;
-
-import java.util.Iterator;
-
-/**
- * Event fired when an edge is removed.
- *
- * @author Stephen Mallette
- */
-public class EdgeRemovedEvent implements Event {
-
-    private final Edge edge;
-
-    public EdgeRemovedEvent(final Edge edge) {
-        this.edge = edge;
-    }
-
-    @Override
-    public void fireEvent(final Iterator<MutationListener> eventListeners) {
-        while (eventListeners.hasNext()) {
-            eventListeners.next().edgeRemoved(edge);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyChangedEvent.java
deleted file mode 100644
index b56cbec..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyChangedEvent.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public abstract class ElementPropertyChangedEvent extends ElementPropertyEvent {
-
-    public ElementPropertyChangedEvent(final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        super(element, oldValue, newValue, vertexPropertyKeyValues);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
deleted file mode 100644
index 8bab91c..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/ElementPropertyEvent.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-
-import java.util.Iterator;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public abstract class ElementPropertyEvent implements Event {
-
-    private final Element element;
-    private final Property oldValue;
-    private final Object newValue;
-    private final Object[] vertexPropertyKeyValues;
-
-    public ElementPropertyEvent(final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        this.element = element;
-        this.oldValue = oldValue;
-        this.newValue = newValue;
-        this.vertexPropertyKeyValues = vertexPropertyKeyValues;
-    }
-
-    abstract void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues);
-
-    @Override
-    public void fireEvent(final Iterator<MutationListener> eventListeners) {
-        while (eventListeners.hasNext()) {
-            fire(eventListeners.next(), element, oldValue, newValue, vertexPropertyKeyValues);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
index 0bbb053..26db28a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/Event.java
@@ -18,13 +18,233 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
 
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+
 import java.util.Iterator;
 
 /**
+ * A representation of some mutation action that occurs on a {@link Graph} for a {@link Traversal}.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public interface Event {
 
-    public void fireEvent(final Iterator<MutationListener> eventListeners);
+    /**
+     * An {@code Event} publishes its action to all the event {@link MutationListener} objects.
+     */
+    void fireEvent(final Iterator<MutationListener> eventListeners);
+
+    /**
+     * Represents an action where an {@link Edge} is added to the {@link Graph}.
+     */
+    class EdgeAddedEvent implements Event {
+
+        private final Edge edge;
+
+        public EdgeAddedEvent(final Edge edge) {
+            this.edge = edge;
+        }
+
+        @Override
+        public void fireEvent(final Iterator<MutationListener> eventListeners) {
+            while (eventListeners.hasNext()) {
+                eventListeners.next().edgeAdded(edge);
+            }
+        }
+    }
+
+    /**
+     * Represents an action where an {@link Edge} {@link Property} is added/modified.  If the {@link Property} is
+     * new then the {@code oldValue} will be {@code null}.
+     */
+    class EdgePropertyChangedEvent extends ElementPropertyChangedEvent {
+
+        public EdgePropertyChangedEvent(final Edge edge, final Property oldValue, final Object newValue) {
+            super(edge, oldValue, newValue);
+        }
+
+        @Override
+        void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            listener.edgePropertyChanged((Edge) element, oldValue, newValue);
+        }
+    }
+
+    /**
+     * Represents an action where an {@link Edge} {@link Property} is removed.
+     */
+    class EdgePropertyRemovedEvent extends ElementPropertyEvent {
+
+        public EdgePropertyRemovedEvent(final Edge element, final Property removed) {
+            super(element, removed, null);
+        }
+
+        @Override
+        void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            listener.edgePropertyRemoved((Edge) element, oldValue);
+        }
+    }
+
+    /**
+     * Represents an action where an {@link Edge} is removed from the {@link Graph}.
+     */
+    class EdgeRemovedEvent implements Event {
+
+        private final Edge edge;
+
+        public EdgeRemovedEvent(final Edge edge) {
+            this.edge = edge;
+        }
+
+        @Override
+        public void fireEvent(final Iterator<MutationListener> eventListeners) {
+            while (eventListeners.hasNext()) {
+                eventListeners.next().edgeRemoved(edge);
+            }
+        }
+    }
+
+    /**
+     * Represents an action where a {@link Vertex} is removed from the {@link Graph}.
+     */
+    class VertexAddedEvent implements Event {
+
+        private final Vertex vertex;
+
+        public VertexAddedEvent(final Vertex vertex) {
+            this.vertex = vertex;
+        }
+
+        @Override
+        public void fireEvent(final Iterator<MutationListener> eventListeners) {
+            while (eventListeners.hasNext()) {
+                eventListeners.next().vertexAdded(vertex);
+            }
+        }
+    }
+
+    /**
+     * Represents an action where a {@link VertexProperty} is modified on a {@link Vertex}.
+     */
+    class VertexPropertyChangedEvent extends ElementPropertyChangedEvent {
+
+        public VertexPropertyChangedEvent(final Vertex element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            super(element, oldValue, newValue, vertexPropertyKeyValues);
+        }
+
+        @Override
+        void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            listener.vertexPropertyChanged((Vertex) element, oldValue, newValue, vertexPropertyKeyValues);
+        }
+    }
+
+    /**
+     * Represents an action where a {@link Property} is modified on a {@link VertexProperty}.
+     */
+    class VertexPropertyPropertyChangedEvent extends ElementPropertyChangedEvent {
+
+        public VertexPropertyPropertyChangedEvent(final VertexProperty element, final Property oldValue, final Object newValue) {
+            super(element, oldValue, newValue);
+        }
+
+        @Override
+        void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            listener.vertexPropertyPropertyChanged((VertexProperty) element, oldValue, newValue);
+        }
+    }
+
+    /**
+     * Represents an action where a {@link Property} is removed from a {@link VertexProperty}.
+     */
+    class VertexPropertyPropertyRemovedEvent extends ElementPropertyEvent {
+
+        public VertexPropertyPropertyRemovedEvent(final VertexProperty element, final Property removed) {
+            super(element, removed, null);
+        }
+
+        @Override
+        void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            listener.vertexPropertyPropertyRemoved((VertexProperty) element, oldValue);
+        }
+    }
+
+    /**
+     * Represents an action where a {@link Property} is removed from a {@link Vertex}.
+     */
+    class VertexPropertyRemovedEvent implements Event {
+
+        private final VertexProperty vertexProperty;
+
+        public VertexPropertyRemovedEvent(final VertexProperty vertexProperty) {
+            this.vertexProperty = vertexProperty;
+        }
+
+        @Override
+        public void fireEvent(final Iterator<MutationListener> eventListeners) {
+            while (eventListeners.hasNext()) {
+                eventListeners.next().vertexPropertyRemoved(vertexProperty);
+            }
+        }
+    }
+
+    /**
+     * Represents an action where a {@link Vertex} is removed from the {@link Graph}.
+     */
+    class VertexRemovedEvent implements Event {
+
+        private final Vertex vertex;
+
+        public VertexRemovedEvent(final Vertex vertex) {
+            this.vertex = vertex;
+        }
+
+        @Override
+        public void fireEvent(final Iterator<MutationListener> eventListeners) {
+            while (eventListeners.hasNext()) {
+                eventListeners.next().vertexRemoved(vertex);
+            }
+        }
+    }
+
+    /**
+     * A base class for {@link Property} mutation events.
+     */
+    abstract class ElementPropertyChangedEvent extends ElementPropertyEvent {
+
+        public ElementPropertyChangedEvent(final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            super(element, oldValue, newValue, vertexPropertyKeyValues);
+        }
+    }
+
+    /**
+     * A base class for {@link Property} mutation events.
+     */
+    abstract class ElementPropertyEvent implements Event {
+
+        private final Element element;
+        private final Property oldValue;
+        private final Object newValue;
+        private final Object[] vertexPropertyKeyValues;
+
+        public ElementPropertyEvent(final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
+            this.element = element;
+            this.oldValue = oldValue;
+            this.newValue = newValue;
+            this.vertexPropertyKeyValues = vertexPropertyKeyValues;
+        }
+
+        abstract void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues);
 
+        @Override
+        public void fireEvent(final Iterator<MutationListener> eventListeners) {
+            while (eventListeners.hasNext()) {
+                fire(eventListeners.next(), element, oldValue, newValue, vertexPropertyKeyValues);
+            }
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
deleted file mode 100644
index aa2dbdc..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexAddedEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-
-import java.util.Iterator;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class VertexAddedEvent implements Event {
-
-    private final Vertex vertex;
-
-    public VertexAddedEvent(final Vertex vertex) {
-        this.vertex = vertex;
-    }
-
-    @Override
-    public void fireEvent(final Iterator<MutationListener> eventListeners) {
-        while (eventListeners.hasNext()) {
-            eventListeners.next().vertexAdded(vertex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
deleted file mode 100644
index caf96c4..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyChangedEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class VertexPropertyChangedEvent extends ElementPropertyChangedEvent {
-
-    public VertexPropertyChangedEvent(final Vertex element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        super(element, oldValue, newValue, vertexPropertyKeyValues);
-    }
-
-    @Override
-    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        listener.vertexPropertyChanged((Vertex) element, oldValue, newValue, vertexPropertyKeyValues);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
deleted file mode 100644
index 633f01b..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyChangedEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class VertexPropertyPropertyChangedEvent extends ElementPropertyChangedEvent {
-
-    public VertexPropertyPropertyChangedEvent(final VertexProperty element, final Property oldValue, final Object newValue) {
-        super(element, oldValue, newValue);
-    }
-
-    @Override
-    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        listener.vertexPropertyPropertyChanged((VertexProperty) element, oldValue, newValue);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
deleted file mode 100644
index e7efec7..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyPropertyRemovedEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Element;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class VertexPropertyPropertyRemovedEvent extends ElementPropertyEvent {
-
-    public VertexPropertyPropertyRemovedEvent(final VertexProperty element, final Property removed) {
-        super(element, removed, null);
-    }
-
-    @Override
-    void fire(final MutationListener listener, final Element element, final Property oldValue, final Object newValue, final Object... vertexPropertyKeyValues) {
-        listener.vertexPropertyPropertyRemoved((VertexProperty) element, oldValue);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
deleted file mode 100644
index 0282a1b..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexPropertyRemovedEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-
-import java.util.Iterator;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class VertexPropertyRemovedEvent implements Event {
-
-    private final VertexProperty vertexProperty;
-
-    public VertexPropertyRemovedEvent(final VertexProperty vertexProperty) {
-        this.vertexProperty = vertexProperty;
-    }
-
-    @Override
-    public void fireEvent(final Iterator<MutationListener> eventListeners) {
-        while (eventListeners.hasNext()) {
-            eventListeners.next().vertexPropertyRemoved(vertexProperty);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/010fee5f/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
deleted file mode 100644
index 067ab0c..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/VertexRemovedEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
-
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-
-import java.util.Iterator;
-
-/**
- * @author Stephen Mallette (http://stephen.genoprime.com)
- */
-public class VertexRemovedEvent implements Event {
-
-    private final Vertex vertex;
-
-    public VertexRemovedEvent(final Vertex vertex) {
-        this.vertex = vertex;
-    }
-
-    @Override
-    public void fireEvent(final Iterator<MutationListener> eventListeners) {
-        while (eventListeners.hasNext()) {
-            eventListeners.next().vertexRemoved(vertex);
-        }
-    }
-}


[3/6] incubator-tinkerpop git commit: Add javadoc to EventCallback.

Posted by sp...@apache.org.
Add javadoc to EventCallback.


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

Branch: refs/heads/master
Commit: f0c97740cf03f0086e1ffe4c94c83df859021e06
Parents: 010fee5
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 08:11:26 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 08:11:26 2015 -0400

----------------------------------------------------------------------
 .../process/traversal/step/util/event/EventCallback.java        | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/f0c97740/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EventCallback.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EventCallback.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EventCallback.java
index 45c02ae..3675ead 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EventCallback.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/event/EventCallback.java
@@ -18,9 +18,14 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.step.util.event;
 
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+
 import java.util.function.Consumer;
 
 /**
+ * A {@link Consumer} function definition for consuming {@link Event} objects raised from {@link Step} objects at
+ * the time of execution.  It allows for actions to be triggered on each {@link Step} execution.
+ *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 @FunctionalInterface


[6/6] incubator-tinkerpop git commit: Update docs for EventStrategy.

Posted by sp...@apache.org.
Update docs for EventStrategy.


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

Branch: refs/heads/master
Commit: 1b37172d501b58bf31a35bd643af7adfe3fcb82b
Parents: cada5f3
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 09:01:27 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 09:01:27 2015 -0400

----------------------------------------------------------------------
 docs/src/the-traversal.asciidoc | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1b37172d/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index d9aa4ea..1868d80 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -1582,7 +1582,6 @@ public class TinkerGraphStepStrategy extends AbstractTraversalStrategy {
 }
 ----
 
-
 The traversal is redefined by simply taking a chain of `has()`-steps after `g.V()` (`TinkerGraphStep`) and providing them to `TinkerGraphStep`. Then its up to TinkerGraphStep to determine if an appropriate index exists. In the code below, review the `vertices()` method and note how if an index exists, for a particular `HasContainer`, then that index is first queried before the remaining `HasContainer` filters are serially applied.
 
 [gremlin-groovy,modern]
@@ -1593,7 +1592,7 @@ t.iterate(); null
 t.toString()
 ----
 
-TinkerPop3 has a number of type-3 strategies distributed as part of its core library.  These strategies add generalized features to a traversal that are typically useful to end-users.  The following sections detail these strategies:
+TinkerPop has a number of type-3 strategies distributed as part of its core library.  These strategies add generalized features to a traversal that are typically useful to end-users.  The following sections detail these strategies:
 
 EventStrategy
 =============
@@ -1611,10 +1610,21 @@ The following events are raised to the `MutationListener`:
 * Vertex removed
 * Edge removed
 
-To start processing events from a `Traversal` first implement the `MutationListener` interface. An example of this implementation is the `ConsoleMutationListener` which writes output to the console for each event.
+To start processing events from a `Traversal` first implement the `MutationListener` interface. An example of this implementation is the `ConsoleMutationListener` which writes output to the console for each event.  The following console session displays the basic usage:
+
+[gremlin-groovy]
+----
+graph = TinkerFactory.createModern()
+l = new ConsoleMutationListener(graph)
+strategy = EventStrategy.build().addListener(l).create()
+g = GraphTraversalSource.build().with(strategy).create(graph)
+g.addV("name","stephen")
+g.E().drop()
+----
 
+The example above uses TinkerGraph which does not support transactions.  As mentioned previously, for these types of graph implementations events are raised as they occur within execution of a `Step`.  As such, the final line of Gremlin execution that drops all edges shows a bit of an inconsistent count, where the removed edge count is accounted for after the event is raised.
 
-CAUTION: `EventStrategy` is not meant for usage in tracking global mutations across separate processes.  In other words, an mutation in what JVM process is not raised as an event in a different JVM process.  In addition, events are not raised when mutations occur as part of side-effect steps (i.e. a lambda).
+CAUTION: `EventStrategy` is not meant for usage in tracking global mutations across separate processes.  In other words, an mutation in what JVM process is not raised as an event in a different JVM process.  In addition, events are not raised when mutations occur outside of the `Traversal` context.
 
 Domain Specific Languages
 -------------------------


[4/6] incubator-tinkerpop git commit: Add "Event" related classes to standard imports.

Posted by sp...@apache.org.
Add "Event" related classes to standard imports.

Event related classes are now available in the ScriptEngine and Console.  Unsure how useful they ultimately are in this context, but will at least  make experimentation possible in the console.


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

Branch: refs/heads/master
Commit: ea51641ff4da600f484c469742d0aff71e1526e8
Parents: f0c9774
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 08:37:04 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 08:37:04 2015 -0400

----------------------------------------------------------------------
 docs/src/the-traversal.asciidoc                 | 26 +++++++++++++++++++-
 .../AbstractImportCustomizerProvider.java       |  4 ++-
 2 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ea51641f/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index 276172d..d9aa4ea 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -1491,10 +1491,11 @@ g.V().out().out().path().by('name').
 TraversalStrategy
 -----------------
 
-image:traversal-strategy.png[width=125,float=right] A `TraversalStrategy` can analyze a `Traversal` and mutate the traversal as it deems fit. This is useful in two situations:
+image:traversal-strategy.png[width=125,float=right] A `TraversalStrategy` can analyze a `Traversal` and mutate the traversal as it deems fit. This is useful in multiple situations:
 
  * There is a more efficient way to express the traversal at the TinkerPop3 level.
  * There is a more efficient way to express the traversal at the graph vendor level.
+ * There are generally useful features that can be automatically embedded into the traversal logic and tend to be applicable to end-users.
 
 A simple TraversalStrategy is the `IdentityRemovalStrategy` and it is a type-1 strategy defined as follows:
 
@@ -1592,6 +1593,29 @@ t.iterate(); null
 t.toString()
 ----
 
+TinkerPop3 has a number of type-3 strategies distributed as part of its core library.  These strategies add generalized features to a traversal that are typically useful to end-users.  The following sections detail these strategies:
+
+EventStrategy
+=============
+
+The purpose of the `EventStrategy` is to raise events to one or more `MutationListener` objects as changes to the underlying `Graph` occur within a `Traversal`. Such a strategy is useful for logging changes, triggering certain actions based on change, or any application that needs notification of some mutating operation during a `Traversal`.  Graphs that do not support transactions will generate events immediately upon mutation, while those graphs that support transactions will queue the mutations until that transaction is committed and will then raise the events.  If the transaction is rolled back, the event queue is reset.
+
+The following events are raised to the `MutationListener`:
+
+* New vertex
+* New edge
+* Vertex property changed
+* Edge property changed
+* Vertex property removed
+* Edge property removed
+* Vertex removed
+* Edge removed
+
+To start processing events from a `Traversal` first implement the `MutationListener` interface. An example of this implementation is the `ConsoleMutationListener` which writes output to the console for each event.
+
+
+CAUTION: `EventStrategy` is not meant for usage in tracking global mutations across separate processes.  In other words, an mutation in what JVM process is not raised as an event in a different JVM process.  In addition, events are not raised when mutations occur as part of side-effect steps (i.e. a lambda).
+
 Domain Specific Languages
 -------------------------
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/ea51641f/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
index 6053cc0..a48dffb 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/AbstractImportCustomizerProvider.java
@@ -37,6 +37,7 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 import org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event;
 import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy;
 import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics;
 import org.apache.tinkerpop.gremlin.structure.Compare;
@@ -88,7 +89,8 @@ public abstract class AbstractImportCustomizerProvider implements ImportCustomiz
         imports.add(GraphComputer.class.getPackage().getName() + DOT_STAR);
         imports.add(GraphTraversal.class.getPackage().getName() + DOT_STAR);
         imports.add(ComputerTraversalEngine.class.getPackage().getName() + DOT_STAR);
-        imports.add(PartitionStrategy.class.getPackage().getName() + DOT_STAR);
+        imports.add(PartitionStrategy.class.getPackage().getName() + DOT_STAR);       // decoration strategies
+        imports.add(Event.class.getPackage().getName() + DOT_STAR);                   // eventing
         staticImports.add(__.class.getCanonicalName() + DOT_STAR);
         staticImports.add(TraversalOptionParent.Pick.class.getCanonicalName() + DOT_STAR);
         staticImports.add(GraphTraversalSource.class.getCanonicalName() + DOT_STAR);