Examples of dumpAllThreads()


Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

         cacheManager.defineConfiguration(cacheName, cfg.build());
         cacheManager.getCache(cacheName);
      }

      ThreadMXBean threadMBean = ManagementFactory.getThreadMXBean();
      ThreadInfo[] threadInfos = threadMBean.dumpAllThreads(false, false);

      String pattern = EVICT_THREAD_NAME_PREFIX;
      int evictionThreadCount = 0;
      for (ThreadInfo threadInfo : threadInfos) {
         if (threadInfo.getThreadName().startsWith(pattern))
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

     */
    private static class ExtendedThreadInfoFactory implements ThreadInfoFactory {
        @Override
        public Map<ThreadInformation, StackTraceElement[]> createThreadInfo() {
            final ThreadMXBean bean = ManagementFactory.getThreadMXBean();
            final ThreadInfo[] array = bean.dumpAllThreads(true, true);

            final Map<ThreadInformation, StackTraceElement[]>  threads =
                new HashMap<ThreadInformation, StackTraceElement[]>(array.length);
            for (final ThreadInfo info : array) {
                threads.put(new ExtendedThreadInformation(info), info.getStackTrace());
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

     * Factory to create extended thread information.
     */
    private static class ExtendedThreadInfoFactory implements ThreadInfoFactory {
        public Map<ThreadInformation, StackTraceElement[]> createThreadInfo() {
            ThreadMXBean bean = ManagementFactory.getThreadMXBean();
            ThreadInfo[] array = bean.dumpAllThreads(true, true);

            Map<ThreadInformation, StackTraceElement[]>  threads =
                new HashMap<ThreadInformation, StackTraceElement[]>(array.length);
            for (ThreadInfo info : array) {
                threads.put(new ExtendedThreadInformation(info), info.getStackTrace());
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

     * Factory to create extended thread information.
     */
    private static class ExtendedThreadInfoFactory implements ThreadInfoFactory {
        public Map<ThreadInformation, StackTraceElement[]> createThreadInfo() {
            ThreadMXBean bean = ManagementFactory.getThreadMXBean();
            ThreadInfo[] array = bean.dumpAllThreads(true, true);

            Map<ThreadInformation, StackTraceElement[]>  threads =
                new HashMap<ThreadInformation, StackTraceElement[]>(array.length);
            for (ThreadInfo info : array) {
                threads.put(new ExtendedThreadInformation(info), info.getStackTrace());
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

        lockedValidator.validate(operation);

        ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
        try {
            ThreadInfo[] infos = mbean.dumpAllThreads(
                                    operation.require(PlatformMBeanConstants.LOCKED_MONITORS).asBoolean(),
                                    operation.require(PlatformMBeanConstants.LOCKED_SYNCHRONIZERS).asBoolean());

            final ModelNode result = context.getResult();
            if (infos != null) {
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

         cacheManager.defineConfiguration(cacheName, cfg.build());
         cacheManager.getCache(cacheName);
      }

      ThreadMXBean threadMBean = ManagementFactory.getThreadMXBean();
      ThreadInfo[] threadInfos = threadMBean.dumpAllThreads(false, false);

      String pattern = "Scheduled-" + EVICT_THREAD_NAME_PREFIX;
      int evictionThreadCount = 0;
      for (ThreadInfo threadInfo : threadInfos) {
         if (threadInfo.getThreadName().startsWith(pattern))
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

    public static ThreadInfo[] getAllThreads() {
        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
        if (threadMXBean.isObjectMonitorUsageSupported()
                && threadMXBean.isSynchronizerUsageSupported()) {
            return threadMXBean.dumpAllThreads(true, true);
        }
        long[] allThreadIds = threadMXBean.getAllThreadIds();
        return getThreadInfos(threadMXBean, allThreadIds);
    }
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

        if (!bean.isThreadContentionMonitoringEnabled()) {
            bean.setThreadContentionMonitoringEnabled(true);
        }

        ThreadInfo[] threadInfo = bean.dumpAllThreads(false, false);
        Arrays.sort(
            threadInfo,
            new Comparator<ThreadInfo>() {
                public int compare(ThreadInfo a, ThreadInfo b) {
                    long diff = b.getThreadId() - a.getThreadId();
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

        lockedValidator.validate(operation);

        ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
        try {
            ThreadInfo[] infos = mbean.dumpAllThreads(
                                    operation.require(PlatformMBeanConstants.LOCKED_MONITORS).asBoolean(),
                                    operation.require(PlatformMBeanConstants.LOCKED_SYNCHRONIZERS).asBoolean());

            final ModelNode result = context.getResult();
            if (infos != null) {
View Full Code Here

Examples of java.lang.management.ThreadMXBean.dumpAllThreads()

         cacheManager.defineConfiguration(cacheName, cfg);
         cacheManager.getCache(cacheName);
      }

      ThreadMXBean threadMBean = ManagementFactory.getThreadMXBean();
      ThreadInfo[] threadInfos = threadMBean.dumpAllThreads(false, false);

      String pattern = "Scheduled-" + EVICT_THREAD_NAME_PREFIX;
      int evictionThreadCount = 0;
      for (ThreadInfo threadInfo : threadInfos) {
         if (threadInfo.getThreadName().startsWith(pattern))
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.