public class GraphStep<S,E extends Element> extends AbstractStep<S,E> implements GraphComputing, AutoCloseable, Configuring
Modifier and Type | Field and Description |
---|---|
protected boolean |
done |
protected Object[] |
ids |
protected boolean |
isStart |
protected Supplier<Iterator<E>> |
iteratorSupplier |
protected Parameters |
parameters |
protected Class<E> |
returnClass |
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
Constructor and Description |
---|
GraphStep(Traversal.Admin traversal,
Class<E> returnClass,
boolean isStart,
Object... ids) |
Modifier and Type | Method and Description |
---|---|
void |
addIds(Object... newIds) |
void |
clearIds() |
void |
close()
Attempts to close an underlying iterator if it is of type
CloseableIterator . |
void |
configure(Object... keyValues)
Accept a configuration to the
Step . |
void |
convertElementsToIds() |
Object[] |
getIds() |
Parameters |
getParameters()
Gets the parameters on the step.
|
Class<E> |
getReturnClass() |
int |
hashCode() |
boolean |
isStartStep() |
static boolean |
isStartStep(Step<?,?> step) |
void |
onGraphComputer()
The step will be executing on a
GraphComputer . |
static boolean |
processHasContainerIds(GraphStep<?,?> graphStep,
HasContainer hasContainer)
Helper method for providers that want to "fold in"
HasContainer 's based on id checking into the ids of the GraphStep . |
protected Traverser.Admin<E> |
processNextStart() |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
boolean |
returnsEdge() |
boolean |
returnsVertex() |
void |
setIteratorSupplier(Supplier<Iterator<E>> iteratorSupplier) |
String |
toString() |
addLabel, addStart, addStarts, clone, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hasNext, next, removeLabel, setId, setNextStep, setPreviousStep, setTraversal
finalize, getClass, notify, notifyAll, wait, wait, wait
atMaster, atMaster
equals, getRequirements
forEachRemaining, remove
protected Parameters parameters
protected Object[] ids
protected boolean isStart
protected boolean done
public GraphStep(Traversal.Admin traversal, Class<E> returnClass, boolean isStart, Object... ids)
public Parameters getParameters()
Parameterizing
getParameters
in interface Parameterizing
public void configure(Object... keyValues)
Configuring
Step
. Note that this interface extends Parameterizing
and so
there is an expectation that the Step
implementation will have a Parameters
instance that will
house any values passed to this method. Storing these configurations in Parameters
is not a requirement
however, IF the configuration is an expected option for the step and can be stored on a member field that can
be accessed on the step by more direct means (i.e. like a getter method).configure
in interface Configuring
public boolean isStartStep()
public static boolean isStartStep(Step<?,?> step)
public boolean returnsVertex()
public boolean returnsEdge()
public Object[] getIds()
public void addIds(Object... newIds)
public void clearIds()
public void onGraphComputer()
GraphComputing
GraphComputer
.onGraphComputer
in interface GraphComputing
public void convertElementsToIds()
protected Traverser.Admin<E> processNextStart()
processNextStart
in class AbstractStep<S,E extends Element>
public void reset()
Step
public int hashCode()
hashCode
in class AbstractStep<S,E extends Element>
public void close()
CloseableIterator
. Graph providers may choose
to return this interface containing their vertices and edges if there are expensive resources that might need to
be released at some point.close
in interface AutoCloseable
public static boolean processHasContainerIds(GraphStep<?,?> graphStep, HasContainer hasContainer)
HasContainer
's based on id checking into the ids of the GraphStep
.graphStep
- the GraphStep to potentially addIds(Object...)
.hasContainer
- The HasContainer
to check for id validation.HasContainer
updated ids and thus, was processed.Copyright © 2013–2020 Apache Software Foundation. All rights reserved.