本文整理匯總了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;
}