org.apache.tinkerpop.gremlin.process.traversal.step.util.event

## 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 and Description
    `ConsoleMutationListener(Graph graph)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `edgeAdded(Edge edge)` Raised after a new `Edge` is added.
    `void` | `edgePropertyChanged(Edge element, Property oldValue, Object setValue)` Raised after the property of a `Edge` changed.
    `void` | `edgePropertyRemoved(Edge element, Property removedValue)` Raised after an `Property` property was removed from an `Edge`.
    `void` | `edgeRemoved(Edge edge)` Raised after an `Edge` was removed from the graph.
    `String` | `toString()`
    `void` | `vertexAdded(Vertex vertex)` Raised when a new `Vertex` is added.
    `void` | `vertexPropertyChanged(Vertex element, VertexProperty oldValue, Object setValue, Object... vertexPropertyKeyValues)` Raised after the property of a `Vertex` changed.
    `void` | `vertexPropertyPropertyChanged(VertexProperty element, Property oldValue, Object setValue)` Raised after the property of a `VertexProperty` changed.
    `void` | `vertexPropertyPropertyRemoved(VertexProperty element, Property oldValue)` Raised after an `Property` property was removed from a `VertexProperty`.
    `void` | `vertexPropertyRemoved(VertexProperty vertexProperty)` Raised after a `VertexProperty` was removed from the graph.
    `void` | `vertexRemoved(Vertex vertex)` Raised after a `Vertex` was removed from the graph.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ConsoleMutationListener

          public ConsoleMutationListener(Graph graph)

  - ### Method Detail

    - #### vertexAdded

          public void vertexAdded(Vertex vertex)

      Description copied from interface: `MutationListener`
      Raised when a new `Vertex` is added.
      Specified by:
        `vertexAdded` in interface `MutationListener`
      Parameters:
        `vertex` - the `Vertex` that was added

    - #### vertexRemoved

          public void vertexRemoved(Vertex vertex)

      Description copied from interface: `MutationListener`
      Raised after a `Vertex` was removed from the graph.
      Specified by:
        `vertexRemoved` in interface `MutationListener`
      Parameters:
        `vertex` - the `Vertex` that was removed

    - #### vertexPropertyRemoved

          public void vertexPropertyRemoved(VertexProperty vertexProperty)

      Description copied from interface: `MutationListener`
      Raised after a `VertexProperty` was removed from the graph.
      Specified by:
        `vertexPropertyRemoved` in interface `MutationListener`
      Parameters:
        `vertexProperty` - the `VertexProperty` that was removed

    - #### edgeAdded

          public void edgeAdded(Edge edge)

      Description copied from interface: `MutationListener`
      Raised after a new `Edge` is added.
      Specified by:
        `edgeAdded` in interface `MutationListener`
      Parameters:
        `edge` - the `Edge` that was added

    - #### edgeRemoved

          public void edgeRemoved(Edge edge)

      Description copied from interface: `MutationListener`
      Raised after an `Edge` was removed from the graph.
      Specified by:
        `edgeRemoved` in interface `MutationListener`
      Parameters:
        `edge` - the `Edge` that was removed.

    - #### edgePropertyRemoved

          public void edgePropertyRemoved(Edge element,
                                          Property removedValue)

      Description copied from interface: `MutationListener`
      Raised after an `Property` property was removed from an `Edge`.
      Specified by:
        `edgePropertyRemoved` in interface `MutationListener`
        `removedValue` - the `Property` that was removed

    - #### edgePropertyChanged

          public void edgePropertyChanged(Edge element,
                                          Property oldValue,
                                          Object setValue)

      Description copied from interface: `MutationListener`
      Raised after the property of a `Edge` changed.
      Specified by:
        `edgePropertyChanged` in interface `MutationListener`
      Parameters:
        `element` - the `Edge` that changed
        `setValue` - 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 a `VertexProperty` changed.
      Specified by:
        `vertexPropertyPropertyChanged` in interface `MutationListener`
      Parameters:
        `element` - the `VertexProperty` that changed
        `setValue` - the new value of the property

    - #### vertexPropertyPropertyRemoved

          public void vertexPropertyPropertyRemoved(VertexProperty element,
                                                    Property oldValue)

      Description copied from interface: `MutationListener`
      Raised after an `Property` property was removed from a `VertexProperty`.
      Specified by:
        `vertexPropertyPropertyRemoved` in interface `MutationListener`
        `oldValue` - the `Property` that removed

    - #### vertexPropertyChanged

          public void vertexPropertyChanged(Vertex element,
                                            VertexProperty oldValue,
                                            Object setValue,
                                            Object... vertexPropertyKeyValues)

      Description copied from interface: `MutationListener`
      Raised after the property of a `Vertex` changed.
      Specified by:
        `vertexPropertyChanged` in interface `MutationListener`
      Parameters:
        `element` - the `Vertex` that changed
        `setValue` - the new value of the property

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.