    001/*
    002 * Copyright (c) 2007-2016 Concurrent, Inc. All Rights Reserved.
    003 *
    004 * Project and contact information: http://www.cascading.org/
    005 *
    006 * This file is part of the Cascading project.
    007 *
    008 * Licensed under the Apache License, Version 2.0 (the "License");
    009 * you may not use this file except in compliance with the License.
    010 * You may obtain a copy of the License at
    011 *
    012 *     http://www.apache.org/licenses/LICENSE-2.0
    013 *
    014 * Unless required by applicable law or agreed to in writing, software
    015 * distributed under the License is distributed on an "AS IS" BASIS,
    016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    017 * See the License for the specific language governing permissions and
    018 * limitations under the License.
    019 */
    020
    021package cascading.flow.planner.rule;
    022
    023/**
    024 *
    025 */
    026public enum PlanPhase
    027  {
    028    // Flow element graph rules
    029    PreBalanceAssembly( ProcessLevel.Assembly, RuleMode.Mutate, ExecAction.Rule ),
    030    BalanceAssembly( ProcessLevel.Assembly, RuleMode.Mutate, ExecAction.Rule ),
    031    PostBalanceAssembly( ProcessLevel.Assembly, RuleMode.Mutate, ExecAction.Rule ),
    032
    033    PreResolveAssembly( ProcessLevel.Assembly, RuleMode.Mutate, ExecAction.Rule ),
    034    ResolveAssembly( ProcessLevel.Assembly, RuleMode.Mutate, ExecAction.Resolve ), // force assembly resolution
    035    PostResolveAssembly( ProcessLevel.Assembly, RuleMode.Mutate, ExecAction.Rule ),
    036
    037    // Flow step sub-graph partition rules
    038    PartitionSteps( ProcessLevel.Step, RuleMode.Partition, ExecAction.Rule ),
    039    PostSteps( ProcessLevel.Step, RuleMode.Mutate, ExecAction.Rule ),
    040
    041    // Flow node sub-graph partition rules
    042    PartitionNodes( ProcessLevel.Node, RuleMode.Partition, ExecAction.Rule ),
    043    PostNodes( ProcessLevel.Node, RuleMode.Mutate, ExecAction.Rule ),
    044
    045    // Flow node pipeline sub-graph partition rules
    046    PartitionPipelines( ProcessLevel.Pipeline, RuleMode.Partition, ExecAction.Rule ),
    047    PostPipelines( ProcessLevel.Pipeline, RuleMode.Mutate, ExecAction.Rule );
    048
    049  ProcessLevel level;
    050  ExecAction action;
    051  RuleMode mode;
    052
    053  PlanPhase( ProcessLevel level, RuleMode mode, ExecAction action )
    054    {
    055    this.level = level;
    056    this.action = action;
    057    this.mode = mode;
    058    }
    059
    060  public ProcessLevel getLevel()
    061    {
    062    return level;
    063    }
    064
    065  public ExecAction getAction()
    066    {
    067    return action;
    068    }
    069
    070  public RuleMode getMode()
    071    {
    072    return mode;
    073    }
    074  }