Class EventUtil
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.event.EventUtil
Logic for registering events with the
EventStrategy and the callback registry. Extracting this logic allows
providers to reuse these utilities more readily.-
Method Summary
Modifier and TypeMethodDescriptionstatic EventStrategyforceGetEventStrategy(Traversal.Admin<Object, Object> traversal) Register a vertex property addition event with the callback registry.static booleanhasAnyCallbacks(CallbackRegistry<? extends Event> callbackRegistry) Register a vertex property addition event with the callback registry.static voidregisterEdgeCreation(CallbackRegistry<Event.EdgeAddedEvent> callbackRegistry, Traversal.Admin<Object, Object> traversal, Edge addedEdge) Register a vertex property addition event with the callback registry.static voidregisterEdgeCreationWithGenericEventRegistry(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object, Object> traversal, Edge addedEdge) Register a vertex property addition event with the callback registry.static voidregisterEdgePropertyChange(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 voidregisterElementRemoval(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object, Object> traversal, Element elementForRemoval) Register a vertex property addition event with the callback registry.static voidregisterLabelChange(CallbackRegistry<Event.ElementLabelChangedEvent> callbackRegistry, Traversal.Admin<?, ?> traversal, Element element, Set<String> oldLabels, Set<String> newLabels) Register a label change event with the callback registry.static voidregisterPropertyChange(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 voidregisterPropertyRemoval(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object, Object> traversal, Property elementForRemoval) Register a vertex property addition event with the callback registry.static voidregisterVertexCreation(CallbackRegistry<Event.VertexAddedEvent> callbackRegistry, Traversal.Admin<Object, Object> traversal, Vertex addedVertex) Register a vertex property addition event with the callback registry.static voidregisterVertexCreationWithGenericEventRegistry(CallbackRegistry<Event> callbackRegistry, Traversal.Admin<Object, Object> traversal, Vertex addedVertex) Register a vertex property addition event with the callback registry.static voidregisterVertexPropertyChange(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 Details
-
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. If the property is new, the old value is aKeyedVertexPropertythat only carries the key, asAddPropertyStepreports it. -
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. If the property is new, the old value is aKeyedPropertythat only carries the key, asAddPropertyStepreports it. -
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. -
registerLabelChange
public static void registerLabelChange(CallbackRegistry<Event.ElementLabelChangedEvent> callbackRegistry, Traversal.Admin<?, ?> traversal, Element element, Set<String> oldLabels, Set<String> newLabels) Register a label change event with the callback registry. -
hasAnyCallbacks
Register a vertex property addition event with the callback registry. -
forceGetEventStrategy
Register a vertex property addition event with the callback registry.
-