Examples of BoundedRangeStatistic


Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

        uptime = new MutableCountStatisticImpl(u);
       
       
        // Initialize a MutableBoundedRangeStatistic
        long upper = Runtime.getRuntime().maxMemory();
        BoundedRangeStatistic h =  new BoundedRangeStatisticImpl(
                    sm.getString("jvmstats.jvm_heapsize"),
                    sm.getString("jvmstats.bytes"),
                    sm.getString("jvmstats.jvm_heapsize_desc"),
                    0, upper, 0);
       
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

            NumberFormat nf = NumberFormat.getNumberInstance(locale);
            if (stats != null) {
                for (int i=0; i < stats.length; i++) {
                    Map statMap = new HashMap();
                    if (stats[i] instanceof BoundedRangeStatistic) {
                        BoundedRangeStatistic stat = (BoundedRangeStatistic)stats[i];
                        statMap.put("Name", stat.getName());
                        statMap.put("Value", nf.format(stat.getCurrent()) + " " + stat.getUnit());
                        statMap.put("Description", stat.getDescription());
                        statMap.put("StartTime", df.format(new Date(stat.getStartTime())));
                        statMap.put("LastSampleTime", df.format(new Date(stat.getLastSampleTime())));
                        statMap.put("Details",
                                GuiUtil.getMessage("monitoring.HighWater")+ ": " + nf.format(stat.getHighWaterMark()) + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.LowWater")+": " + nf.format(stat.getLowWaterMark()) + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.UpperBound")+": " + nf.format(stat.getUpperBound()) + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.LowerBound")+": " + nf.format(stat.getLowerBound())+ " " + stat.getUnit()+ "<br/>");
                    } else if (stats[i] instanceof BoundaryStatistic) {
                        BoundaryStatistic stat = (BoundaryStatistic)stats[i];
                        statMap.put("Name", stat.getName());
                        statMap.put("Value", "");
                        statMap.put("Description", stat.getDescription());
                        statMap.put("StartTime", df.format(new Date(stat.getStartTime())));
                        statMap.put("LastSampleTime", df.format(new Date(stat.getLastSampleTime())));
                        statMap.put("Details",
                                GuiUtil.getMessage("monitoring.UpperBound")+": " + stat.getUpperBound() + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.LowerBound")+": " + stat.getLowerBound()+ " " + stat.getUnit()+ "<br/>");
                    } else if (stats[i] instanceof RangeStatistic) {
                        RangeStatistic stat = (RangeStatistic)stats[i];
                        statMap.put("Name", stat.getName());
                        statMap.put("Value", stat.getCurrent() + " " + stat.getUnit());
                        statMap.put("Description", stat.getDescription());
                        statMap.put("StartTime", df.format(new Date(stat.getStartTime())));
                        statMap.put("LastSampleTime", df.format(new Date(stat.getLastSampleTime())));
                        statMap.put("Details",
                                GuiUtil.getMessage("monitoring.HighWater")+": " + stat.getHighWaterMark() + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.LowWater")+": " + stat.getLowWaterMark() + " " + stat.getUnit()+ "<br/>");
                    } else if (stats[i] instanceof CountStatistic) {
                        CountStatistic stat = (CountStatistic)stats[i];
                        statMap.put("Name", stat.getName());
                        statMap.put("Value", stat.getCount() + " " + stat.getUnit());
                        statMap.put("Description", stat.getDescription());
                        statMap.put("StartTime", df.format(new Date(stat.getStartTime())));
                        statMap.put("LastSampleTime", df.format(new Date(stat.getLastSampleTime())));
                        statMap.put("Details", "");
                    } else if (stats[i] instanceof TimeStatistic) {
                        TimeStatistic stat = (TimeStatistic)stats[i];
                        statMap.put("Name", stat.getName());
                        statMap.put("Value", stat.getCount() + " " + stat.getUnit());
                        statMap.put("Description", stat.getDescription());
                        statMap.put("StartTime", df.format(new Date(stat.getStartTime())));
                        statMap.put("LastSampleTime", df.format(new Date(stat.getLastSampleTime())));
                        statMap.put("Details",
                                GuiUtil.getMessage("monitoring.MaxTime")+": " + stat.getMaxTime() + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.MinTime")+": " + stat.getMinTime() + " " + stat.getUnit() + "<br/>" +
                                GuiUtil.getMessage("monitoring.TotalTime")+": " + stat.getTotalTime() + " " + stat.getUnit()+ "<br/>");
                    } else if (stats[i] instanceof StringStatistic) {
                        StringStatistic stat = (StringStatistic)stats[i];
                        statMap.put("Name", stat.getName());
                        statMap.put("Value", stat.getCurrent());
                        statMap.put("Description", stat.getDescription());
                        statMap.put("StartTime", df.format(new Date(stat.getStartTime())));
                        statMap.put("LastSampleTime", df.format(new Date(stat.getLastSampleTime())));
                        statMap.put("Details", "");
                    } else if (stats[i] instanceof Statistic) {
                        statMap.put("Name", stats[i].getName());
                        statMap.put("Value", stats[i].getUnit());
                        statMap.put("Description", stats[i].getDescription());
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

        {
          final BeanCacheMonitor  m  = (BeanCacheMonitor)iter.next();
          final EJBCacheStats    s  = m.getEJBCacheStats();
         
          // verify that we can get each Statistic; there was a problem at one time
          final BoundedRangeStatistic b1  = s.getCacheMisses();
          final BoundedRangeStatistic b2  = s.getCacheHits();
          final BoundedRangeStatistic b3  = s.getBeansInCache();
         
          // these were failing
          final CountStatistic c4 = s.getPassivationSuccesses();
          final CountStatistic c3  = s.getExpiredSessionsRemoved();
          final CountStatistic c2  = s.getPassivationErrors();
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

      if (stats[i] instanceof CountStatistic) {
    CountStatistic stat = (CountStatistic) stats[i];
    sbuf.append(stat.getName()).append("=")
        .append(stat.getCount()).append("; ");
      } else if (stats[iinstanceof BoundedRangeStatistic) {
    BoundedRangeStatistic stat = (BoundedRangeStatistic) stats[i];
    sbuf.append(stat.getName()).append("=")
        .append(stat.getCurrent()).append("; ");
      } else {
    sbuf.append(stats[i].getName()).append("=?");
      }
  }
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

    final RangeStatistic rs = (RangeStatistic)stc;
    return ( s.append(rs.getLowWaterMark()).append(SEP).append(rs.getHighWaterMark()).toString() );
  }
  private String boundedRangeStatisticSpecificString() {
    final StringBuffer s = new StringBuffer();
    final BoundedRangeStatistic bs = (BoundedRangeStatistic)stc;
    return ( s.append(bs.getUpperBound()).append(SEP).append(bs.getLowerBound()).toString() );
  }
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

      return cs;
   }

   public BoundedRangeStatistic getFreePoolSize()
   {
      BoundedRangeStatistic brs = (BoundedRangeStatistic) getStatistic("FreePoolSize");
      return brs;
   }
View Full Code Here

Examples of javax.management.j2ee.statistics.BoundedRangeStatistic

      return brs;
   }

   public BoundedRangeStatistic getPoolSize()
   {
      BoundedRangeStatistic brs = (BoundedRangeStatistic) getStatistic("PoolSize");
      return brs;
   }
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.