Package org.linkedin.glu.provisioner.core.model

Examples of org.linkedin.glu.provisioner.core.model.SystemEntry


    for(String childKey : _expectedChildrenKeys)
    {
      if(!isFilteredOut(childKey))
      {
        SystemEntry child =
          _delta.getSystemModelDelta().getExpectedSystemModel().findEntry(childKey);

        if(computeDepth(child) > expectedParentStateDepth)
          expectedParentState = child.getEntryState();
      }
    }

    return expectedParentState;
  }
View Full Code Here


    filteredKeys.remove(parentKey);
  }

  protected InternalSystemEntryDelta createSystemEntryDelta(String entryKey)
  {
    SystemEntry expectedEntry = getUnfilteredExpectedModel().findEntry(entryKey);
    SystemEntry currentEntry = getUnfilteredCurrentModel().findEntry(entryKey);

    if(currentEntry != null && currentEntry.isEmptyAgent() && expectedEntry == null)
    {
      expectedEntry = currentEntry;
    }

    if(currentEntry == null && expectedEntry == null)
View Full Code Here

  {
    EntryDependenciesImpl dependencies = new EntryDependenciesImpl();

    for(String key : getFilteredKeys())
    {
      SystemEntry entry = model.findEntry(key);
      if(entry != null && !SystemEntry.DEFAULT_PARENT.equals(entry.getParent()))
      {
        SystemEntry parentEntry = model.findEntry(entry.getAgent(), entry.getParent());
        if(parentEntry == null)
        {
          log.warn("model does not contain parent (" + entry.getParent() + ") for " + key);
        }
        else
        {
          dependencies.setParent(key, parentEntry.getKey());
        }
      }

      Collection<String> children = model.findChildrenKeys(key);
      if(children != null)
View Full Code Here

    InternalActionDescriptor actionDescriptor;

    if(INSTALL_SCRIPT_ACTION.equals(getAction()))
    {
      ScriptLifecycleInstallActionDescriptor ad = new ScriptLifecycleInstallActionDescriptor();
      SystemEntry expectedEntry = entryDelta.getExpectedEntry();
      if(!expectedEntry.isDefaultParent())
        ad.setParent(expectedEntry.getParent());
      ad.setScript(expectedEntry.getScript());
      Map initParameters = (Map) expectedEntry.getInitParameters();
      if(initParameters == null)
        initParameters = new TreeMap();
      else
        initParameters = new TreeMap(initParameters);
      if(!expectedEntry.getMetadata().isEmpty())
        initParameters.put("metadata", expectedEntry.getMetadata());
      if(expectedEntry.hasTags())
        initParameters.put("tags", expectedEntry.getTags());
      if(!initParameters.isEmpty())
        ad.setInitParameters(initParameters);
      actionDescriptor = ad;
    }
    else
View Full Code Here

      _stateMachine = delta.build().findAnyEntryDelta(_parent.getKey()).getStateMachine();

      Set<String> childrenKeys = expectedDependencies.findChildren(parentKey);
      for(String childKey : childrenKeys)
      {
        SystemEntry child = delta.getUnfilteredExpectedModel().findEntry(childKey).clone();
        _children.add(child);
      }
    }

  }
View Full Code Here

    else
    {
      Iterator<SystemEntry> iter = _children.iterator();
      while(iter.hasNext())
      {
        SystemEntry child = iter.next();
        if(!isFilteredOut(child.getKey()))
        {
          iter.remove();
        }
      }
    }
View Full Code Here

  private void processEntry(String state, String entryKey, SystemModel newExpectedModel)
  {
    if(state == null)
      return;

    SystemEntry systemEntry = findSystemEntry(entryKey);
    systemEntry = systemEntry.clone();
    systemEntry.setEntryState(state);
    newExpectedModel.addEntry(systemEntry);
    _newFilteredKeys.add(entryKey);
  }
View Full Code Here

    _newFilteredKeys.add(entryKey);
  }

  private SystemEntry findSystemEntry(String entryKey)
  {
    SystemEntry systemEntry = _latestDelta.getUnfilteredExpectedModel().findEntry(entryKey);

    if(systemEntry == null)
      systemEntry = getOriginalUnfilteredExpectedModel().findEntry(entryKey);

    return systemEntry;
View Full Code Here

TOP

Related Classes of org.linkedin.glu.provisioner.core.model.SystemEntry

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.