当前位置: 首页>>代码示例>>Java>>正文


Java Event.VertexAddedEvent方法代码示例

本文整理汇总了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();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:14,代码来源:AddVertexStartStep.java

示例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;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:10,代码来源:AddVertexStep.java

示例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();
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:16,代码来源:AddVertexStartStep.java

示例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;
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:11,代码来源:AddVertexStep.java

示例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;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:AddVertexStartStep.java

示例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;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:6,代码来源:AddVertexStep.java


注:本文中的org.apache.tinkerpop.gremlin.process.traversal.step.util.event.Event.VertexAddedEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。