Examples of dumpAllThreads()


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

    String dir = null;
   
    protected Object doExecute() throws Exception {

        ThreadMXBean mxbean = ManagementFactory.getThreadMXBean();
        ThreadInfo[] threads = mxbean.dumpAllThreads(true, true);
       
        String timestamp = df.format(new Date());
       
        File dumpFile = null;
        PrintWriter writer = null;
View Full Code Here

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

public class TestUtils
{
    public static String dumpThreads()
    {
        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
        ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(true, true);
        StringBuilder dump = new StringBuilder();
        dump.append(String.format("%n"));
        for (ThreadInfo threadInfo : threadInfos)
        {
            dump.append(threadInfo);
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() {
            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()

         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

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()

public class TestUtils
{
    public static String dumpThreads()
    {
        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
        ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(true, true);
        StringBuilder dump = new StringBuilder();
        dump.append(String.format("%n"));
        for (ThreadInfo threadInfo : threadInfos)
        {
            dump.append(threadInfo);
View Full Code Here

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

    bean.setThreadContentionMonitoringEnabled(true);

    ThreadInfo[] threads;

    if (m_dumpLocked) {
      threads = bean.dumpAllThreads(true, true);
    } else {
      threads = bean.dumpAllThreads(false, false);
    }

    thread.setCount(bean.getThreadCount());
View Full Code Here

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

    ThreadInfo[] threads;

    if (m_dumpLocked) {
      threads = bean.dumpAllThreads(true, true);
    } else {
      threads = bean.dumpAllThreads(false, false);
    }

    thread.setCount(bean.getThreadCount());
    thread.setDaemonCount(bean.getDaemonThreadCount());
    thread.setPeekCount(bean.getPeakThreadCount());
View Full Code Here

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

    m_jspViewer.view(ctx, model);
  }

  private void showThreadDump(Model model, Payload payload) {
    ThreadMXBean bean = ManagementFactory.getThreadMXBean();
    ThreadInfo[] threads = bean.dumpAllThreads(true, true);
    StringBuilder sb = new StringBuilder(32768);
    int index = 1;

    TreeMap<String, ThreadInfo> sortedThreads = new TreeMap<String, ThreadInfo>();
View Full Code Here

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

    return usage;
  }
 
  public ThreadInfo[] getThreadDump() {
    ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
    return threadMxBean.dumpAllThreads(true, true);
  }
 
  public ThreadUsage getThreadUsage() {
    ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
    ThreadUsage threadUsage = new ThreadUsage();
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.