Class CheckClassTypeStep

  • All Implemented Interfaces:
    ExecutionStep, ExecutionStepInternal

    public class CheckClassTypeStep
    extends AbstractExecutionStep

    This step is used just as a gate check for classes (eg. for CREATE VERTEX to make sure that the passed class is a vertex class).

    It accepts two values: a target class and a parent class. If the two classes are the same or if the parent class is indeed a parent class of the target class, then the syncPool() returns an empty result set, otherwise it throws an PCommandExecutionException

    Author:
    Luigi Dell'Aquila (luigi.dellaquila-(at)-gmail.com)
    • Constructor Detail

      • CheckClassTypeStep

        public CheckClassTypeStep​(String targetClass,
                                  String parentClass,
                                  CommandContext ctx,
                                  boolean profilingEnabled)
        Parameters:
        targetClass - a class to be checked
        parentClass - a class that is supposed to be the same or a parent class of the target class
        ctx - execuiton context
        profilingEnabled - true to collect execution stats
    • Method Detail

      • prettyPrint

        public String prettyPrint​(int depth,
                                  int indent)
      • getCost

        public long getCost()
        Description copied from interface: ExecutionStep
        returns the absolute cost (in nanoseconds) of the execution of this step
        Returns:
        the absolute cost (in nanoseconds) of the execution of this step, -1 if not calculated