Class ManageableExecutorService<T extends ExecutorService>

    • Constructor Detail

      • ManageableExecutorService

        public ManageableExecutorService()
    • Method Detail

      • getPoolSize

        @ManagedAttribute(description="Returns the number of threads in this executor.",
                          displayName="Number of executor threads",
                          dataType=TRAIT)
        public int getPoolSize()
      • getActiveCount

        @ManagedAttribute(description="Returns the number of active executor threads.",
                          displayName="Number of active executor threads",
                          dataType=TRAIT)
        public int getActiveCount()
      • getMaximumPoolSize

        @ManagedAttribute(description="Returns the maximum number of executor threads.",
                          displayName="Maximum number of executor threads",
                          dataType=TRAIT,
                          writable=true)
        public int getMaximumPoolSize()
      • setMaximumPoolSize

        public void setMaximumPoolSize​(int maximumPoolSize)
      • getLargestPoolSize

        @ManagedAttribute(description="Returns the largest ever number of executor threads.",
                          displayName="Largest number of executor threads",
                          dataType=TRAIT)
        public int getLargestPoolSize()
      • getQueueSize

        @ManagedAttribute(description="Returns the number of elements in this executor\'s queue.",
                          displayName="Elements in the queue",
                          dataType=TRAIT)
        public int getQueueSize()
      • getKeepAliveTime

        @ManagedAttribute(description="Returns the keep-alive time for this pool\'s threads",
                          displayName="Keep-alive for pooled threads",
                          dataType=TRAIT)
        public long getKeepAliveTime()
      • setKeepAliveTime

        public void setKeepAliveTime​(long milliseconds)