Class ContainerThread

java.lang.Object
java.lang.Thread
com.yahoo.jdisc.application.ContainerThread
All Implemented Interfaces:
Runnable

public class ContainerThread extends Thread

This class decorates Thread to allow for internal jDISC optimizations. Whenever possible a jDISC application should use this class instead of Thread. The ContainerThread.Factory class is a helper-class for working with the Executors framework.

Author:
Simon Thoresen Hult
  • Constructor Details

    • ContainerThread

      public ContainerThread(Runnable target, MetricConsumer consumer)
      Allocates a new ContainerThread object. This constructor calls the parent Thread(Runnable) constructor.
      Parameters:
      target - the object whose run method is called.
      consumer - the MetricConsumer of this thread.
  • Method Details

    • consumer

      public MetricConsumer consumer()

      Returns the MetricConsumer of this. Note that this may be null.

      Returns:
      The MetricConsumer of this, or null.