Examples of BoundedRangeStatisticImpl


Examples of com.sun.enterprise.admin.monitor.stats.BoundedRangeStatisticImpl

    }

    protected void initSessionStats() {
  super.initSessionStats();
  passivateCountStat = new MutableBoundedRangeStatisticImpl(
      new BoundedRangeStatisticImpl("PassiveCount"));
    }
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.BoundedRangeStatisticImpl

    protected void initialize() {
  super.initialize("com.sun.enterprise.admin.monitor.stats.EJBCacheStats");

  cacheHits = new MutableBoundedRangeStatisticImpl(
    new BoundedRangeStatisticImpl("CacheHits"));
  cacheMisses = new MutableBoundedRangeStatisticImpl(
    new BoundedRangeStatisticImpl("CacheMisses"));
  numBeans = new MutableBoundedRangeStatisticImpl(
    new BoundedRangeStatisticImpl("NumBeansInCache",
       "Count", 0, delegate.getMaxCacheSize(), 0));
  expiredStat = new MutableCountStatisticImpl(
    new CountStatisticImpl("NumExpiredSessionsRemoved"));
  passivationErrors = new MutableCountStatisticImpl(
    new CountStatisticImpl("NumPassivationErrors"));
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.BoundedRangeStatisticImpl

  long now = System.currentTimeMillis();

  synchronized (currentSizeLock) {
      currentSize = new MutableBoundedRangeStatisticImpl(
        new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
      Long.MAX_VALUE, 0, "CurrentSize",
      "bytes", "Number of sessions in store", now, now)
      );
  }

  synchronized (activationCountLock) {
      activationCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("ActivationCount"));
      activationSuccessCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("ActivationSuccessCount"));
      activationErrorCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("ActivationErrorCount"));
  }

  synchronized (activationSizeLock) {
      activationSize = new MutableAverageRangeStatisticImpl(
        new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
      Long.MAX_VALUE, 0, "ActivationSize",
      "bytes", "Number of bytes activated", now, now)
      );
  }

  synchronized (passivationSizeLock) {
      passivationSize = new MutableAverageRangeStatisticImpl(
        new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
      Long.MAX_VALUE, 0, "PassivationSize",
      "bytes", "Number of bytes passivated", now, now)
      );
  }

  synchronized (passivationCountLock) {
      passivationCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("PassivationCount"));
      passivationSuccessCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("PassivationSuccessCount"));
      passivationErrorCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("PassivationErrorCount"));
  }

  synchronized (expiredSessionCountLock) {
      expiredSessionCount = new MutableCountStatisticImpl(
    new CountStatisticImpl("ExpiredSessionCount"));
  }

  synchronized (activationTimeLock) {
      activationTime = new MutableAverageRangeStatisticImpl(
        new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
      Long.MAX_VALUE, 0, "ActivationTime",
      "millis", "Time spent on activation", now, now)
      );
  }

  synchronized (passivationTimeLock) {
      passivationTime = new MutableAverageRangeStatisticImpl(
        new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
      Long.MAX_VALUE, 0, "PassivationTime",
      "millis", "Time spent on passivation", now, now)
      );
  }
    }
View Full Code Here

Examples of org.apache.activemq.management.BoundedRangeStatisticImpl

    /**
     * Use case for BoundedRangeStatisticImpl class.
     * @throws Exception
     */
    public void testStatistic() throws Exception {
        BoundedRangeStatisticImpl stat = new BoundedRangeStatisticImpl("myRange", "millis", "myDescription", 10, 3000);
        assertStatistic(stat, "myRange", "millis", "myDescription");
        assertEquals(10, stat.getLowerBound());
        assertEquals(3000, stat.getUpperBound());

        assertRangeStatistic(stat);
    }
View Full Code Here

Examples of org.apache.geronimo.management.stats.BoundedRangeStatisticImpl

    public Stats getStats() {
        RuntimeMXBean runmxbean = ManagementFactory.getRuntimeMXBean();
        MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
        MemoryUsage memUsage = memmxbean.getHeapMemoryUsage();
        CountStatisticImpl upTime;
        BoundedRangeStatisticImpl heapSize;
       
        if (stats == null) {
            stats = new JVMStatsImpl();
            // setup UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setStartTime(runmxbean.getStartTime());
            upTime.setCount(runmxbean.getUptime());
            // setup Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setStartTime(runmxbean.getStartTime());
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
            heapSize.setLowWaterMark(memUsage.getUsed());
            heapSize.setHighWaterMark(memUsage.getUsed());
        } else {
            // update UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setCount(runmxbean.getUptime());
            // update Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
        }
        long now = upTime.getStartTime() + upTime.getCount();
        upTime.setLastSampleTime(now);
        heapSize.setLastSampleTime(now);

        return stats;
    }
View Full Code Here

Examples of org.apache.geronimo.management.stats.BoundedRangeStatisticImpl

    public Date getKernelBootTime() {
        return kernel.getBootTime();
    }

    public Stats getStats() {
        BoundedRangeStatisticImpl heap;
        if(stats == null) {
            stats = new JVMStatsImpl();
            long start = kernel.getBootTime().getTime();
            stats.getUpTimeImpl().setCount(start);
            stats.getUpTimeImpl().setStartTime(start);
            heap = stats.getHeapSizeImpl();
            heap.setStartTime(start);
            heap.setBounds(0, runtime.totalMemory());
            heap.setCurrent(heap.getUpperBound() - runtime.freeMemory());
            heap.setLowWaterMark(heap.getCurrent());
            heap.setHighWaterMark(heap.getCurrent());
        } else {
            heap = stats.getHeapSizeImpl();
            heap.setBounds(0, runtime.totalMemory());
            heap.setCurrent(heap.getUpperBound() - runtime.freeMemory());
        }
        long now = System.currentTimeMillis();
        stats.getUpTimeImpl().setLastSampleTime(now);
        heap.setLastSampleTime(now);
        return stats;
    }
View Full Code Here

Examples of org.apache.geronimo.management.stats.BoundedRangeStatisticImpl

    public Stats getStats() {
        RuntimeMXBean runmxbean = ManagementFactory.getRuntimeMXBean();
        MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
        MemoryUsage memUsage = memmxbean.getHeapMemoryUsage();
        CountStatisticImpl upTime;
        BoundedRangeStatisticImpl heapSize;

        if (stats == null) {
            stats = new JVMStatsImpl();
            // setup UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setStartTime(runmxbean.getStartTime());
            upTime.setCount(runmxbean.getUptime());
            // setup Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setStartTime(runmxbean.getStartTime());
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
            heapSize.setLowWaterMark(memUsage.getUsed());
            heapSize.setHighWaterMark(memUsage.getUsed());
        } else {
            // update UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setCount(runmxbean.getUptime());
            // update Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
        }
        long now = upTime.getStartTime() + upTime.getCount();
        upTime.setLastSampleTime(now);
        heapSize.setLastSampleTime(now);

        return stats;
    }
View Full Code Here

Examples of org.apache.geronimo.management.stats.BoundedRangeStatisticImpl

    public Stats getStats() {
        RuntimeMXBean runmxbean = ManagementFactory.getRuntimeMXBean();
        MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
        MemoryUsage memUsage = memmxbean.getHeapMemoryUsage();
        CountStatisticImpl upTime;
        BoundedRangeStatisticImpl heapSize;

        if (stats == null) {
            stats = new JVMStatsImpl();
            // setup UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setStartTime(runmxbean.getStartTime());
            upTime.setCount(runmxbean.getUptime());
            // setup Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setStartTime(runmxbean.getStartTime());
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
            heapSize.setLowWaterMark(memUsage.getUsed());
            heapSize.setHighWaterMark(memUsage.getUsed());
        } else {
            // update UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setCount(runmxbean.getUptime());
            // update Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
        }
        long now = upTime.getStartTime() + upTime.getCount();
        upTime.setLastSampleTime(now);
        heapSize.setLastSampleTime(now);

        return stats;
    }
View Full Code Here

Examples of org.apache.geronimo.management.stats.BoundedRangeStatisticImpl

    public Stats getStats() {
        RuntimeMXBean runmxbean = ManagementFactory.getRuntimeMXBean();
        MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
        MemoryUsage memUsage = memmxbean.getHeapMemoryUsage();
        CountStatisticImpl upTime;
        BoundedRangeStatisticImpl heapSize;
       
        if (stats == null) {
            stats = new JVMStatsImpl();
            // setup UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setStartTime(runmxbean.getStartTime());
            upTime.setCount(runmxbean.getUptime());
            // setup Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setStartTime(runmxbean.getStartTime());
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
            heapSize.setLowWaterMark(memUsage.getUsed());
            heapSize.setHighWaterMark(memUsage.getUsed());
        } else {
            // update UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setCount(runmxbean.getUptime());
            // update Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
        }
        long now = upTime.getStartTime() + upTime.getCount();
        upTime.setLastSampleTime(now);
        heapSize.setLastSampleTime(now);

        return stats;
    }
View Full Code Here

Examples of org.apache.geronimo.management.stats.BoundedRangeStatisticImpl

    public Stats getStats() {
        RuntimeMXBean runmxbean = ManagementFactory.getRuntimeMXBean();
        MemoryMXBean memmxbean = ManagementFactory.getMemoryMXBean();
        MemoryUsage memUsage = memmxbean.getHeapMemoryUsage();
        CountStatisticImpl upTime;
        BoundedRangeStatisticImpl heapSize;
       
        if (stats == null) {
            stats = new JVMStatsImpl();
            // setup UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setStartTime(runmxbean.getStartTime());
            upTime.setCount(runmxbean.getUptime());
            // setup Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setStartTime(runmxbean.getStartTime());
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
            heapSize.setLowWaterMark(memUsage.getUsed());
            heapSize.setHighWaterMark(memUsage.getUsed());
        } else {
            // update UpTime CountStatistic
            upTime = stats.getUpTimeImpl();
            upTime.setCount(runmxbean.getUptime());
            // update Heap BoundedRangeStatistic
            heapSize = stats.getHeapSizeImpl();
            heapSize.setBounds(0, memUsage.getMax());
            heapSize.setCurrent(memUsage.getUsed());
        }
        long now = upTime.getStartTime() + upTime.getCount();
        upTime.setLastSampleTime(now);
        heapSize.setLastSampleTime(now);

        return stats;
    }
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.