Class EventUtil
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventUtil
-
public final class EventUtil extends Object
Logic for registering events with theEventStrategy
and the callback registry. Extracting this logic allows providers to reuse these utilities more readily.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EventStrategy
forceGetEventStrategy(Traversal.Admin<Object,Object> traversal)
Register a vertex property addition event with the callback registry.static boolean
hasAnyCallbacks(CallbackRegistry<? extends Event> callbackRegistry)
Register a vertex property addition event with the callback registry.static void
registerEdgeCreation(CallbackRegistry<Event.EdgeAddedEvent> callbackRegistry, Traversal.Admin<Object,Object> traversal, Edge addedEdge)
Register a vertex property addition event with the callback registry.static void
registerEdgeCreationWithGenericEventRegistry(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Edge addedEdge)
Register a vertex property addition event with the callback registry.static void
registerEdgePropertyChange(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Edge edge, String key, Object value)
Register an edge property change event with the callback registry.static void
registerElementRemoval(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Element elementForRemoval)
Register a vertex property addition event with the callback registry.static void
registerPropertyChange(CallbackRegistry<Event.ElementPropertyChangedEvent> callbackRegistry, EventStrategy es, Element affectedElement, Property removedProperty, Object value, Object[] vertexPropertyKeyValues)
Register a vertex property addition event with the callback registry.static void
registerPropertyRemoval(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Property elementForRemoval)
Register a vertex property addition event with the callback registry.static void
registerVertexCreation(CallbackRegistry<Event.VertexAddedEvent> callbackRegistry, Traversal.Admin<Object,Object> traversal, Vertex addedVertex)
Register a vertex property addition event with the callback registry.static void
registerVertexCreationWithGenericEventRegistry(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Vertex addedVertex)
Register a vertex property addition event with the callback registry.static void
registerVertexPropertyChange(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Vertex vertex, String key, Object value)
Register a vertex property change event with the callback registry.
-
-
-
Method Detail
-
registerVertexPropertyChange
public static void registerVertexPropertyChange(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Vertex vertex, String key, Object value)
Register a vertex property change event with the callback registry.
-
registerEdgePropertyChange
public static void registerEdgePropertyChange(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Edge edge, String key, Object value)
Register an edge property change event with the callback registry.
-
registerEdgeCreation
public static void registerEdgeCreation(CallbackRegistry<Event.EdgeAddedEvent> callbackRegistry, Traversal.Admin<Object,Object> traversal, Edge addedEdge)
Register a vertex property addition event with the callback registry.
-
registerEdgeCreationWithGenericEventRegistry
public static void registerEdgeCreationWithGenericEventRegistry(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Edge addedEdge)
Register a vertex property addition event with the callback registry.
-
registerVertexCreation
public static void registerVertexCreation(CallbackRegistry<Event.VertexAddedEvent> callbackRegistry, Traversal.Admin<Object,Object> traversal, Vertex addedVertex)
Register a vertex property addition event with the callback registry.
-
registerVertexCreationWithGenericEventRegistry
public static void registerVertexCreationWithGenericEventRegistry(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Vertex addedVertex)
Register a vertex property addition event with the callback registry.
-
registerElementRemoval
public static void registerElementRemoval(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Element elementForRemoval)
Register a vertex property addition event with the callback registry.
-
registerPropertyRemoval
public static void registerPropertyRemoval(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object,Object> traversal, Property elementForRemoval)
Register a vertex property addition event with the callback registry.
-
registerPropertyChange
public static void registerPropertyChange(CallbackRegistry<Event.ElementPropertyChangedEvent> callbackRegistry, EventStrategy es, Element affectedElement, Property removedProperty, Object value, Object[] vertexPropertyKeyValues)
Register a vertex property addition event with the callback registry.
-
hasAnyCallbacks
public static boolean hasAnyCallbacks(CallbackRegistry<? extends Event> callbackRegistry)
Register a vertex property addition event with the callback registry.
-
forceGetEventStrategy
public static EventStrategy forceGetEventStrategy(Traversal.Admin<Object,Object> traversal)
Register a vertex property addition event with the callback registry.
-
-