Class ThreadDumpCollector

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

    public class ThreadDumpCollector
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    Collects thread dumps for a period of time and returns them as zip file.
    • Constructor Detail

      • ThreadDumpCollector

        public ThreadDumpCollector()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • startCollecting

        public void startCollecting​(long interval)
        interval in milliseconds
      • isDumpAvailable

        public boolean isDumpAvailable()
      • getResult

        public java.nio.file.Path getResult()
      • isCollecting

        public boolean isCollecting()
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception