Examples of refreshAttributes()


Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache manager could be found and attributes where refreshed, so it's up.", bean);
            return AvailabilityType.UP;
         }
         if (trace) log.trace("Cache manager could not be found, so cache manager is down");
         return AvailabilityType.DOWN;
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      boolean trace = log.isTraceEnabled();
      if (trace) log.trace("Get values for these metrics: {0}", metrics);
      EmsConnection conn = getConnection();
      if (trace) log.trace("Connection to ems server stablished: {0}", conn);
      EmsBean bean = queryCacheManagerBean(conn);
      bean.refreshAttributes();
      if (trace) log.trace("Querying returned bean: {0}", bean);
      for (MeasurementScheduleRequest req : metrics) {
         DataType type = req.getDataType();
         if (type == DataType.MEASUREMENT) {
            String tmp = (String) bean.getAttribute(req.getName()).getValue();
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      try {
         conn.refresh();
         EmsBean bean = conn.getBean(context.getResourceKey());
         EmsAttribute attribute = bean.getAttribute("CacheStatus");
         if (attribute.getValue().equals(ComponentStatus.RUNNING.toString())) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache status is running and attributes could be refreshed, so it's up.");
            return AvailabilityType.UP;
         }
         if (trace) log.trace("Cache status is anything other than running, so it's down.");
         return AvailabilityType.DOWN;
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

            String abbrev = metric.substring(0, metric.indexOf("."));
            String mbean = myNamePattern + abbrev;
            EmsBean bean = conn.getBean(mbean);
            if (bean != null) {
               if (trace) log.trace("Retrieved mbean with name {0}", mbean);
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      EmsConnection conn = getEmsConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache manager "+bean+" could be found and attributes where refreshed, so it's up.");
            return AvailabilityType.UP;
         }
         if (trace) log.trace("Cache manager could not be found, so cache manager is down");
         return AvailabilityType.DOWN;
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      boolean trace = log.isTraceEnabled();
      if (trace) log.trace("Get values for these metrics: " + metrics);
      EmsConnection conn = getEmsConnection();
      if (trace) log.trace("Connection to ems server established: " + conn);
      EmsBean bean = queryCacheManagerBean(conn);
      bean.refreshAttributes();
      if (trace) log.trace("Querying returned bean: " + bean);
      for (MeasurementScheduleRequest req : metrics) {
         DataType type = req.getDataType();
         if (type == DataType.MEASUREMENT) {
            EmsAttribute att = bean.getAttribute(req.getName());
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheBean();
         if (bean != null && bean.getAttribute("CacheStatus").getValue().equals("RUNNING")) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache "+cacheName+" within "+cacheManagerName+" cache manager is running and attributes could be refreshed, so it's up.");
            return AvailabilityType.UP;
         }
         if (trace) log.trace("Cache status for "+cacheName+" within "+cacheManagerName+" cache manager is anything other than running, so it's down.");
         return AvailabilityType.DOWN;
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

         String metric = req.getName();
         try {
            EmsBean bean = queryComponentBean(metric);
            if (bean != null) {
               if (trace) log.trace("Retrieved mbean with name "+ bean.getBeanName());
               bean.refreshAttributes();
               String attName = metric.substring(metric.indexOf(".") + 1);
               EmsAttribute att = bean.getAttribute(attName);
               // Attribute values are of various data types
               if (att != null) {
                  Object o = att.getValue();
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      EmsConnection conn = getConnection();
      try {
         conn.refresh();
         EmsBean bean = queryCacheManagerBean(conn);
         if (bean != null) {
            bean.refreshAttributes();
            if (trace) log.trace("Cache manager could be found and attributes where refreshed, so it's up.", bean);
            return AvailabilityType.UP;
         }
         if (trace) log.trace("Cache manager could not be found, so cache manager is down");
         return AvailabilityType.DOWN;
View Full Code Here

Examples of org.mc4j.ems.connection.bean.EmsBean.refreshAttributes()

      boolean trace = log.isTraceEnabled();
      if (trace) log.trace("Get values for these metrics: {0}", metrics);
      EmsConnection conn = getConnection();
      if (trace) log.trace("Connection to ems server stablished: {0}", conn);
      EmsBean bean = queryCacheManagerBean(conn);
      bean.refreshAttributes();
      if (trace) log.trace("Querying returned bean: {0}", bean);
      for (MeasurementScheduleRequest req : metrics) {
         DataType type = req.getDataType();
         if (type == DataType.MEASUREMENT) {
            String tmp = (String) bean.getAttribute(req.getName()).getValue();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.