org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration

## Class EventStrategy

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
  - - org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategy

- All Implemented Interfaces:
    Serializable, Comparable<Class<? extends TraversalStrategy>>, TraversalStrategy<TraversalStrategy.DecorationStrategy>, TraversalStrategy.DecorationStrategy

      public final class EventStrategy
      extends AbstractTraversalStrategy<TraversalStrategy.DecorationStrategy>
      implements TraversalStrategy.DecorationStrategy

  A strategy that raises events when `Mutating` steps are encountered and successfully executed.

  Note that this implementation requires a `Graph` on the `Traversal` instance. If that is not present an `IllegalStateException` will be thrown.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `EventStrategy.Builder`
    `static class` | `EventStrategy.DefaultEventQueue` Immediately notifies all listeners as events arrive.
    `static interface` | `EventStrategy.EventQueue` Gathers messages from callbacks and fires them to listeners.
    `class` | `EventStrategy.EventStrategyCallback`
    `static class` | `EventStrategy.TransactionalEventQueue` Stores events in a queue that builds up until the transaction is committed which then fires them in the order they were received.

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `TraversalStrategy.DecorationStrategy, TraversalStrategy.FinalizationStrategy, TraversalStrategy.OptimizationStrategy, TraversalStrategy.ProviderOptimizationStrategy, TraversalStrategy.VerificationStrategy`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `STRATEGY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Traversal.Admin<?,?> traversal)`
    `static EventStrategy.Builder` | `build()`
    `<R> R` | `detach(R attached)` Applies the appropriate detach operation to elements that will be raised in mutation events.
    `<R extends Property> R` | `empty(Element element, String key)` For newly created properties that do not yet exist, an empty `Property` is required that just contains a key as a reference.
    `Class<?>` | `getDetachmentFactory()`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy

      `equals, hashCode, toString`

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.DecorationStrategy

      `compareTo, getTraversalCategory`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy

      `applyPost, applyPrior, getConfiguration`

- - ### Method Detail

    - #### getDetachmentFactory

          public Class<?> getDetachmentFactory()

    - #### detach

          public <R> R detach(R attached)

      Applies the appropriate detach operation to elements that will be raised in mutation events.

    - #### empty

          public <R extends Property> R empty(Element element,
                                              String key)

      For newly created properties that do not yet exist, an empty `Property` is required that just contains a key as a reference.

    - #### apply

          public void apply(Traversal.Admin<?,?> traversal)

      Specified by:
        `apply` in interface `TraversalStrategy<TraversalStrategy.DecorationStrategy>`

    - #### build

          public static EventStrategy.Builder build()

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