Package io.fabric8.api

Examples of io.fabric8.api.AutoScaleStatus


        root.getConnection().run(new IJMXRunnable() {
         
          @Override
          public void run(MBeanServerConnection connection) throws JMXException {
            // TODO REPLACE WITH BETTER JmxTemplateImpl...
            BrokerFacade facade = new RemoteBrokerFacade(connection);
            BrokerNode broker = new BrokerNode(root, facade, "Broker");
            root.addChild(broker);
          }
        });
      } catch (CoreException e) {
View Full Code Here


    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.activemq")) {
          BrokerFacade facade = new JmxTemplateBrokerFacade(new JmxPluginJmxTemplate(r.getConnection()));
          String brokerName = null;
          try {
            brokerName = facade.getBrokerName();
          } catch (Exception e) {
            ActiveMQJMXPlugin.getLogger().warning("Could not find Broker name: " + e, e);
          }
          if (brokerName == null) {
            brokerName = "Broker";
View Full Code Here

    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.activemq")) {
          BrokerFacade facade = new JmxTemplateBrokerFacade(new JmxPluginJmxTemplate(r.getConnection()));
          String brokerName = null;
          try {
            brokerName = facade.getBrokerName();
          } catch (Exception e) {
            ActiveMQJMXPlugin.getLogger().warning("Could not find Broker name: " + e, e);
          }
          if (brokerName == null) {
            brokerName = "Broker";
View Full Code Here

        root.getConnection().run(new IJMXRunnable() {
         
          @Override
          public void run(MBeanServerConnection connection) throws JMXException {
            // TODO REPLACE WITH BETTER JmxTemplateImpl...
            BrokerFacade facade = new RemoteBrokerFacade(connection);
            BrokerNode broker = new BrokerNode(root, facade, "Broker");
            root.addChild(broker);
          }
        });
      } catch (CoreException e) {
View Full Code Here

            LOG.info("Host " + host + " has " + countingMap);
        }
    }

    public static HostProfileCounter assertSshAutoScale(FabricRequirements requirements) {
        return assertSshAutoScale(requirements, new AutoScaleStatus());
    }
View Full Code Here

    @Override
    public AutoScaleStatus getAutoScaleStatus() {
        assertValid();
        try {
            AutoScaleStatus answer = null;
            String zkPath = ZkPath.AUTO_SCALE_STATUS.getPath();
            if (configCache.getCurrentData(zkPath) != null) {
                String json = getStringData(configCache, zkPath);
                answer = RequirementsJson.autoScaleStatusFromJSON(json);
            }
            if (answer == null) {
                answer = new AutoScaleStatus();
            }
            return answer;
        } catch (Exception e) {
            throw FabricException.launderThrowable(e);
        }
View Full Code Here

        return fabricService.getAutoScaleStatus();
    }

    @Override
    public String autoScaleStatusAsJson() {
        AutoScaleStatus dto = autoScaleStatus();

        if (dto != null) {
            try {
                return getObjectMapper()
                        .writerWithDefaultPrettyPrinter()
View Full Code Here

    }

    @Override
    protected Object doExecute() throws Exception {
        PrintStream out = System.out;
        AutoScaleStatus status = getFabricService().getAutoScaleStatus();
        printStatus(out, status);
        return null;
    }
View Full Code Here

    private void autoScale() {
        FabricService service = fabricService.get();
        FabricRequirements requirements = service.getRequirements();
        List<ProfileRequirements> profileRequirements = requirements.getProfileRequirements();
        if (profileRequirements != null && !profileRequirements.isEmpty()) {
            AutoScaleStatus status = new AutoScaleStatus();
            for (ProfileRequirements profileRequirement : profileRequirements) {
                ContainerAutoScaler autoScaler = createAutoScaler(requirements, profileRequirement);
                if (autoScaler != null) {
                    autoScaleProfile(service, autoScaler, requirements, profileRequirement, status);
                } else {
View Full Code Here

    private void autoScale() {
        FabricService service = fabricService.get();
        FabricRequirements requirements = service.getRequirements();
        List<ProfileRequirements> profileRequirements = requirements.getProfileRequirements();
        if (profileRequirements != null && !profileRequirements.isEmpty()) {
            AutoScaleStatus status = new AutoScaleStatus();
            for (ProfileRequirements profileRequirement : profileRequirements) {
                autoScaleProfile(service, requirements, profileRequirement, status);
            }
            if (zkMasterCache != null) {
                try {
View Full Code Here

TOP

Related Classes of io.fabric8.api.AutoScaleStatus

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.