本文整理汇总了Java中org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event.VertexAddedEvent方法的典型用法代码示例。如果您正苦于以下问题:Java Event.VertexAddedEvent方法的具体用法?Java Event.VertexAddedEvent怎么用?Java Event.VertexAddedEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event
的用法示例。
在下文中一共展示了Event.VertexAddedEvent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processNextStart
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event; //导入方法依赖的package包/类
@Override
protected Traverser.Admin<Vertex> processNextStart() {
if (this.first) {
this.first = false;
final Vertex vertex = this.getTraversal().getGraph().get().addVertex(this.parameters.getKeyValues(EmptyTraverser.instance()));
if (this.callbackRegistry != null) {
final Event.VertexAddedEvent vae = new Event.VertexAddedEvent(DetachedFactory.detach(vertex, true));
this.callbackRegistry.getCallbacks().forEach(c -> c.accept(vae));
}
return this.getTraversal().getTraverserGenerator().generate(vertex, this, 1l);
} else
throw FastNoSuchElementException.instance();
}
示例2: map
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event; //导入方法依赖的package包/类
@Override
protected Vertex map(final Traverser.Admin<S> traverser) {
final Vertex vertex = this.getTraversal().getGraph().get().addVertex(this.parameters.getKeyValues(traverser));
if (this.callbackRegistry != null) {
final Event.VertexAddedEvent vae = new Event.VertexAddedEvent(DetachedFactory.detach(vertex, true));
this.callbackRegistry.getCallbacks().forEach(c -> c.accept(vae));
}
return vertex;
}
示例3: processNextStart
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event; //导入方法依赖的package包/类
@Override
protected Traverser.Admin<Vertex> processNextStart() {
if (this.first) {
this.first = false;
final TraverserGenerator generator = this.getTraversal().getTraverserGenerator();
final Vertex vertex = this.getTraversal().getGraph().get().addVertex(this.parameters.getKeyValues(generator.generate(false, (Step) this, 1L)));
if (this.callbackRegistry != null) {
final EventStrategy eventStrategy = getTraversal().getStrategies().getStrategy(EventStrategy.class).get();
final Event.VertexAddedEvent vae = new Event.VertexAddedEvent(eventStrategy.detach(vertex));
this.callbackRegistry.getCallbacks().forEach(c -> c.accept(vae));
}
return generator.generate(vertex, this, 1L);
} else
throw FastNoSuchElementException.instance();
}
示例4: map
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event; //导入方法依赖的package包/类
@Override
protected Vertex map(final Traverser.Admin<S> traverser) {
final Vertex vertex = this.getTraversal().getGraph().get().addVertex(this.parameters.getKeyValues(traverser));
if (this.callbackRegistry != null) {
final EventStrategy eventStrategy = getTraversal().getStrategies().getStrategy(EventStrategy.class).get();
final Event.VertexAddedEvent vae = new Event.VertexAddedEvent(eventStrategy.detach(vertex));
this.callbackRegistry.getCallbacks().forEach(c -> c.accept(vae));
}
return vertex;
}
示例5: getMutatingCallbackRegistry
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event; //导入方法依赖的package包/类
@Override
public CallbackRegistry<Event.VertexAddedEvent> getMutatingCallbackRegistry() {
if (null == this.callbackRegistry) this.callbackRegistry = new ListCallbackRegistry<>();
return this.callbackRegistry;
}
示例6: getMutatingCallbackRegistry
import org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event; //导入方法依赖的package包/类
@Override
public CallbackRegistry<Event.VertexAddedEvent> getMutatingCallbackRegistry() {
if (null == callbackRegistry) callbackRegistry = new ListCallbackRegistry<>();
return callbackRegistry;
}