Class Janitor

  • All Implemented Interfaces:
    com.yahoo.component.Component, com.yahoo.component.Deconstructable, java.lang.Comparable<com.yahoo.component.Component>

    public class Janitor
    extends com.yahoo.component.AbstractComponent
    Separate janitor threadpool for tasks that cannot be executed on the jdisc default threadpool due to risk of deadlock. Modelled as a separate component as the underlying executor must be available across JettyHttpServer instances.
    Author:
    bjorncs
    • Field Summary

      • Fields inherited from class com.yahoo.component.AbstractComponent

        isDeconstructable
    • Constructor Summary

      Constructors 
      Constructor Description
      Janitor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deconstruct()  
      void scheduleTask​(java.lang.Runnable task)  
      • Methods inherited from class com.yahoo.component.AbstractComponent

        clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Janitor

        @Inject
        public Janitor()
    • Method Detail

      • scheduleTask

        public void scheduleTask​(java.lang.Runnable task)
      • deconstruct

        public void deconstruct()
        Specified by:
        deconstruct in interface com.yahoo.component.Deconstructable
        Overrides:
        deconstruct in class com.yahoo.component.AbstractComponent