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 void
edgeAdded(Edge edge)
Raised after a newEdge
is added.void
edgePropertyChanged(Edge element, Property oldValue, Object setValue)
Raised after the property of aEdge
changed.void
edgePropertyRemoved(Edge element, Property removedValue)
void
edgeRemoved(Edge edge)
Raised after anEdge
was removed from the graph.String
toString()
void
vertexAdded(Vertex vertex)
Raised when a newVertex
is added.void
vertexPropertyChanged(Vertex element, VertexProperty oldValue, Object setValue, Object... vertexPropertyKeyValues)
Raised after the property of aVertex
changed.void
vertexPropertyPropertyChanged(VertexProperty element, Property oldValue, Object setValue)
Raised after the property of aVertexProperty
changed.void
vertexPropertyPropertyRemoved(VertexProperty element, Property oldValue)
Raised after anProperty
property was removed from aVertexProperty
.void
vertexPropertyRemoved(VertexProperty vertexProperty)
Raised after aVertexProperty
was removed from the graph.void
vertexRemoved(Vertex vertex)
Raised after aVertex
was removed from the graph.
-
-
-
Constructor Detail
-
ConsoleMutationListener
public ConsoleMutationListener(Graph graph)
-
-
Method Detail
-
vertexAdded
public void vertexAdded(Vertex vertex)
Description copied from interface:MutationListener
Raised when a newVertex
is added.- Specified by:
vertexAdded
in interfaceMutationListener
- Parameters:
vertex
- theVertex
that was added
-
vertexRemoved
public void vertexRemoved(Vertex vertex)
Description copied from interface:MutationListener
Raised after aVertex
was removed from the graph.- Specified by:
vertexRemoved
in interfaceMutationListener
- Parameters:
vertex
- theVertex
that was removed
-
vertexPropertyRemoved
public void vertexPropertyRemoved(VertexProperty vertexProperty)
Description copied from interface:MutationListener
Raised after aVertexProperty
was removed from the graph.- Specified by:
vertexPropertyRemoved
in interfaceMutationListener
- Parameters:
vertexProperty
- theVertexProperty
that was removed
-
edgeAdded
public void edgeAdded(Edge edge)
Description copied from interface:MutationListener
Raised after a newEdge
is added.- Specified by:
edgeAdded
in interfaceMutationListener
- Parameters:
edge
- theEdge
that was added
-
edgeRemoved
public void edgeRemoved(Edge edge)
Description copied from interface:MutationListener
Raised after anEdge
was removed from the graph.- Specified by:
edgeRemoved
in interfaceMutationListener
- Parameters:
edge
- theEdge
that was removed.
-
edgePropertyRemoved
public void edgePropertyRemoved(Edge element, Property removedValue)
Description copied from interface:MutationListener
- Specified by:
edgePropertyRemoved
in interfaceMutationListener
removedValue
- theProperty
that was removed
-
edgePropertyChanged
public void edgePropertyChanged(Edge element, Property oldValue, Object setValue)
Description copied from interface:MutationListener
Raised after the property of aEdge
changed.- Specified by:
edgePropertyChanged
in interfaceMutationListener
- Parameters:
element
- theEdge
that changedsetValue
- the new value of the property
-
vertexPropertyPropertyChanged
public void vertexPropertyPropertyChanged(VertexProperty element, Property oldValue, Object setValue)
Description copied from interface:MutationListener
Raised after the property of aVertexProperty
changed.- Specified by:
vertexPropertyPropertyChanged
in interfaceMutationListener
- Parameters:
element
- theVertexProperty
that changedsetValue
- the new value of the property
-
vertexPropertyPropertyRemoved
public void vertexPropertyPropertyRemoved(VertexProperty element, Property oldValue)
Description copied from interface:MutationListener
Raised after anProperty
property was removed from aVertexProperty
.- Specified by:
vertexPropertyPropertyRemoved
in interfaceMutationListener
oldValue
- theProperty
that removed
-
vertexPropertyChanged
public void vertexPropertyChanged(Vertex element, VertexProperty oldValue, Object setValue, Object... vertexPropertyKeyValues)
Description copied from interface:MutationListener
Raised after the property of aVertex
changed.- Specified by:
vertexPropertyChanged
in interfaceMutationListener
- Parameters:
element
- theVertex
that changedsetValue
- the new value of the property
-
-