Class ConsoleMutationListener
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.event.ConsoleMutationListener
-
- All Implemented Interfaces:
MutationListener
public class ConsoleMutationListener extends Object implements MutationListener
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)
-
-
Constructor Summary
Constructors Constructor Description ConsoleMutationListener(Graph graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidedgeAdded(Edge edge)Raised after a newEdgeis added.voidedgePropertyChanged(Edge element, Property oldValue, Object setValue)Raised after the property of aEdgechanged.voidedgePropertyRemoved(Edge element, Property removedValue)voidedgeRemoved(Edge edge)Raised after anEdgewas removed from the graph.StringtoString()voidvertexAdded(Vertex vertex)Raised when a newVertexis added.voidvertexPropertyChanged(Vertex element, VertexProperty oldValue, Object setValue, Object... vertexPropertyKeyValues)Raised after the property of aVertexchanged.voidvertexPropertyPropertyChanged(VertexProperty element, Property oldValue, Object setValue)Raised after the property of aVertexPropertychanged.voidvertexPropertyPropertyRemoved(VertexProperty element, Property oldValue)Raised after anPropertyproperty was removed from aVertexProperty.voidvertexPropertyRemoved(VertexProperty vertexProperty)Raised after aVertexPropertywas removed from the graph.voidvertexRemoved(Vertex vertex)Raised after aVertexwas removed from the graph.
-
-
-
Constructor Detail
-
ConsoleMutationListener
public ConsoleMutationListener(Graph graph)
-
-
Method Detail
-
vertexAdded
public void vertexAdded(Vertex vertex)
Description copied from interface:MutationListenerRaised when a newVertexis added.- Specified by:
vertexAddedin interfaceMutationListener- Parameters:
vertex- theVertexthat was added
-
vertexRemoved
public void vertexRemoved(Vertex vertex)
Description copied from interface:MutationListenerRaised after aVertexwas removed from the graph.- Specified by:
vertexRemovedin interfaceMutationListener- Parameters:
vertex- theVertexthat was removed
-
vertexPropertyRemoved
public void vertexPropertyRemoved(VertexProperty vertexProperty)
Description copied from interface:MutationListenerRaised after aVertexPropertywas removed from the graph.- Specified by:
vertexPropertyRemovedin interfaceMutationListener- Parameters:
vertexProperty- theVertexPropertythat was removed
-
edgeAdded
public void edgeAdded(Edge edge)
Description copied from interface:MutationListenerRaised after a newEdgeis added.- Specified by:
edgeAddedin interfaceMutationListener- Parameters:
edge- theEdgethat was added
-
edgeRemoved
public void edgeRemoved(Edge edge)
Description copied from interface:MutationListenerRaised after anEdgewas removed from the graph.- Specified by:
edgeRemovedin interfaceMutationListener- Parameters:
edge- theEdgethat was removed.
-
edgePropertyRemoved
public void edgePropertyRemoved(Edge element, Property removedValue)
Description copied from interface:MutationListener- Specified by:
edgePropertyRemovedin interfaceMutationListenerremovedValue- thePropertythat was removed
-
edgePropertyChanged
public void edgePropertyChanged(Edge element, Property oldValue, Object setValue)
Description copied from interface:MutationListenerRaised after the property of aEdgechanged.- Specified by:
edgePropertyChangedin interfaceMutationListener- Parameters:
element- theEdgethat changedsetValue- the new value of the property
-
vertexPropertyPropertyChanged
public void vertexPropertyPropertyChanged(VertexProperty element, Property oldValue, Object setValue)
Description copied from interface:MutationListenerRaised after the property of aVertexPropertychanged.- Specified by:
vertexPropertyPropertyChangedin interfaceMutationListener- Parameters:
element- theVertexPropertythat changedsetValue- the new value of the property
-
vertexPropertyPropertyRemoved
public void vertexPropertyPropertyRemoved(VertexProperty element, Property oldValue)
Description copied from interface:MutationListenerRaised after anPropertyproperty was removed from aVertexProperty.- Specified by:
vertexPropertyPropertyRemovedin interfaceMutationListeneroldValue- thePropertythat removed
-
vertexPropertyChanged
public void vertexPropertyChanged(Vertex element, VertexProperty oldValue, Object setValue, Object... vertexPropertyKeyValues)
Description copied from interface:MutationListenerRaised after the property of aVertexchanged.- Specified by:
vertexPropertyChangedin interfaceMutationListener- Parameters:
element- theVertexthat changedsetValue- the new value of the property
-
-