Package gov.nasa.arc.mct.services.internal.component

Examples of gov.nasa.arc.mct.services.internal.component.Updatable


  }
 
    private void updateComponentIfNecessary(final ComponentSpec c, final Collection<AbstractComponent> cachedComponents) {
      Collection<AbstractComponent> delegateComponets = new ArrayList<AbstractComponent>();
      for (final AbstractComponent ac : cachedComponents) {
        Updatable updatable = ac.getCapability(Updatable.class);
        updatable.setStaleByVersion(c.getComponentId(), c.getObjVersion());
        cleanCacheIfNecessary(c.getComponentId(), c.getObjVersion());
        if (ac.getWorkUnitDelegate() != null) {
          ac.getWorkUnitDelegate().getCapability(Updatable.class).setStaleByVersion(c.getComponentId(), c.getObjVersion());
          delegateComponets.add(ac.getWorkUnitDelegate());
        }
      }
      cachedComponents.addAll(delegateComponets);
      for (final AbstractComponent ac: cachedComponents) {
        if (ac.isStale()) {
              ac.resetComponentProperties(new AbstractComponent.ResetPropertiesTransaction() {
                 
                  @Override
                  public void perform() {
                      Updatable updatable = ac.getCapability(Updatable.class);
                      updatable.notifyStale();
                  }
              });
              LOGGER.debug("{} updated", c.getComponentName());
          }
      }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.services.internal.component.Updatable

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.