Package org.linkedin.glu.orchestration.engine.delta

Examples of org.linkedin.glu.orchestration.engine.delta.SingleDeltaStatusInfo


    if(!"delta".equals(childDelta.getDeltaStatus()))
    {
      childDelta.clearDeltaState();
      childDelta.setDeltaStatus("parentDelta");
      childDelta.setDeltaState(SystemEntryDelta.DeltaState.ERROR);
      childDelta.setDeltaStatusInfo(new SingleDeltaStatusInfo("needs redeploy (parent delta)"));
      unfilter(childDelta);
    }
  }
View Full Code Here


    // means that it is not deployed at all
    if(sed.getCurrentEntry() == null)
    {
      sed.setDeltaStatus("notDeployed");
      sed.setDeltaState(SystemEntryDelta.DeltaState.ERROR);
      sed.setDeltaStatusInfo(new SingleDeltaStatusInfo("NOT deployed"));
      return;
    }

    // means that it should not be deployed at all
    if(sed.getExpectedEntry() == null)
    {
      sed.setDeltaStatus("unexpected");
      sed.setDeltaState(SystemEntryDelta.DeltaState.ERROR);
      sed.setDeltaStatusInfo(new SingleDeltaStatusInfo("should NOT be deployed"));
      return;
    }

    // processing delta
    processDelta(sed);
View Full Code Here

      // when only a difference in state
      if(sed.findEntryStateDelta() != null && keys.size() == 1)
      {
        sed.setDeltaStatus("notExpectedState");
        sed.setDeltaStatusInfo(new SingleDeltaStatusInfo(sed.getExpectedEntryState() + "!=" +
                                                         sed.getCurrentEntryState()));
      }
      else
      {
        // handle it as a delta
        sed.setDeltaStatus("delta");
        keys = new TreeSet<String>(keys);
        Collection<String> values = new ArrayList<String>(keys.size());
        for(String key : keys)
        {
          SystemEntryValueWithDelta<Object> errorValue = sed.findErrorValue(key);
          values.add(key + ":[" + errorValue.getExpectedValue() + "!=" +
                     errorValue.getCurrentValue() + "]");

        }
        sed.setDeltaStatusInfo(MultipleDeltaStatusInfo.create(values));
      }
    }
    else
    {
      // when there is an error
      if(sed.getError() != null)
      {
        sed.setDeltaState(SystemEntryDelta.DeltaState.ERROR);
        sed.setDeltaStatus("error");
        sed.setDeltaStatusInfo(new SingleDeltaStatusInfo(sed.getError().toString()));
      }
      else
      {
        // empty agent
        if(sed.isEmptyAgent())
        {
          sed.setDeltaState(SystemEntryDelta.DeltaState.NA);
          sed.setDeltaStatus("NA");
          sed.setDeltaStatusInfo(new SingleDeltaStatusInfo("empty agent"));
        }
        else
        {
          // everything ok!
          sed.setDeltaState(SystemEntryDelta.DeltaState.OK);
          sed.setDeltaStatus("expectedState");
          sed.setDeltaStatusInfo(new SingleDeltaStatusInfo(sed.getExpectedEntryState()));
        }
      }
    }

  }
View Full Code Here

TOP

Related Classes of org.linkedin.glu.orchestration.engine.delta.SingleDeltaStatusInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.