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 whenMutating
steps are encountered and successfully executed. Note that this implementation requires aGraph
on theTraversal
instance. If that is not present anIllegalStateException
will be thrown. Finally, this strategy is meant for use on the JVM only and has no analogous implementation in other Gremlin Language Variants.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventStrategy.Builder
static class
EventStrategy.DefaultEventQueue
Immediately notifies all listeners as events arrive.static interface
EventStrategy.Detacher
A common interface for detachment.static class
EventStrategy.Detachment
Options for detaching elements from the graph during eventing.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 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.EventStrategy.Detachment
getDetachment()
-
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
applyPost, applyPrior, getConfiguration
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy.DecorationStrategy
compareTo, getTraversalCategory
-
-
-
-
Method Detail
-
getDetachment
public EventStrategy.Detachment getDetachment()
-
detach
public <R> R detach(R attached)
Applies the appropriate detach operation to elements that will be raised in mutation events.
-
apply
public void apply(Traversal.Admin<?,?> traversal)
- Specified by:
apply
in interfaceTraversalStrategy<TraversalStrategy.DecorationStrategy>
-
build
public static EventStrategy.Builder build()
-
-