Class CheckClusterTypeStep

java.lang.Object
com.orientechnologies.orient.core.sql.executor.AbstractExecutionStep
com.orientechnologies.orient.core.sql.executor.CheckClusterTypeStep
All Implemented Interfaces:
OExecutionStep, OExecutionStepInternal

public class CheckClusterTypeStep extends AbstractExecutionStep
This step is used just as a gate check to verify that a cluster belongs to a class.

It accepts two values: a target cluster (name or OCluster) and a class. If the cluster belongs to the class, then the syncPool() returns an empty result set, otherwise it throws an OCommandExecutionException

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

    • CheckClusterTypeStep

      public CheckClusterTypeStep(String targetClusterName, String clazz, OCommandContext ctx, boolean profilingEnabled)
    • CheckClusterTypeStep

      public CheckClusterTypeStep(OCluster targetCluster, String clazz, OCommandContext ctx, boolean profilingEnabled)
  • Method Details

    • syncPull

      public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException
      Throws:
      OTimeoutException
    • prettyPrint

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

      public long getCost()
      Description copied from interface: OExecutionStep
      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