org.glassfish.grizzly.threadpool
Class ThreadPoolProbe.Adapter

java.lang.Object
  extended by org.glassfish.grizzly.threadpool.ThreadPoolProbe.Adapter
All Implemented Interfaces:
ThreadPoolProbe
Enclosing interface:
ThreadPoolProbe

public static class ThreadPoolProbe.Adapter
extends java.lang.Object
implements ThreadPoolProbe

ThreadPoolProbe adapter that provides no-op implementations for all interface methods allowing easy extension by the developer.

Since:
2.1.9

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.grizzly.threadpool.ThreadPoolProbe
ThreadPoolProbe.Adapter
 
Constructor Summary
ThreadPoolProbe.Adapter()
           
 
Method Summary
 void onMaxNumberOfThreadsEvent(AbstractThreadPool threadPool, int maxNumberOfThreads)
           This event may be fired when the AbstractThreadPool implementation has allocated and is managing a number of threads equal to the maximum limit of the pool.
 void onTaskCompleteEvent(AbstractThreadPool threadPool, java.lang.Runnable task)
           This event may be fired when a dequeued task has completed processing.
 void onTaskDequeueEvent(AbstractThreadPool threadPool, java.lang.Runnable task)
           This event may be fired when a task has been pulled from the queue and is about to be processed.
 void onTaskQueueEvent(AbstractThreadPool threadPool, java.lang.Runnable task)
           This event may be fired when a task has been queued for processing.
 void onTaskQueueOverflowEvent(AbstractThreadPool threadPool)
           This event may be fired when the task queue of the AbstractThreadPool implementation has exceeded its configured size.
 void onThreadAllocateEvent(AbstractThreadPool threadPool, java.lang.Thread thread)
           This event may be fired when an AbstractThreadPool implementation allocates a new managed Thread.
 void onThreadPoolStartEvent(AbstractThreadPool threadPool)
           This event may be fired when an AbstractThreadPool implementation starts running.
 void onThreadPoolStopEvent(AbstractThreadPool threadPool)
           This event may be fired when an AbstractThreadPool implementation stops.
 void onThreadReleaseEvent(AbstractThreadPool threadPool, java.lang.Thread thread)
           This event may be fired when a thread will no longer be managed by the AbstractThreadPool implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolProbe.Adapter

public ThreadPoolProbe.Adapter()
Method Detail

onThreadPoolStartEvent

public void onThreadPoolStartEvent(AbstractThreadPool threadPool)

This event may be fired when an AbstractThreadPool implementation starts running.

Specified by:
onThreadPoolStartEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored

onThreadPoolStopEvent

public void onThreadPoolStopEvent(AbstractThreadPool threadPool)

This event may be fired when an AbstractThreadPool implementation stops.

Specified by:
onThreadPoolStopEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored

onThreadAllocateEvent

public void onThreadAllocateEvent(AbstractThreadPool threadPool,
                                  java.lang.Thread thread)

This event may be fired when an AbstractThreadPool implementation allocates a new managed Thread.

Specified by:
onThreadAllocateEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored
thread - the thread that has been allocated

onThreadReleaseEvent

public void onThreadReleaseEvent(AbstractThreadPool threadPool,
                                 java.lang.Thread thread)

This event may be fired when a thread will no longer be managed by the AbstractThreadPool implementation.

Specified by:
onThreadReleaseEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored
thread - the thread that is no longer being managed by the AbstractThreadPool

onMaxNumberOfThreadsEvent

public void onMaxNumberOfThreadsEvent(AbstractThreadPool threadPool,
                                      int maxNumberOfThreads)

This event may be fired when the AbstractThreadPool implementation has allocated and is managing a number of threads equal to the maximum limit of the pool.

Specified by:
onMaxNumberOfThreadsEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored
maxNumberOfThreads - the maximum number of threads allowed in the AbstractThreadPool

onTaskQueueEvent

public void onTaskQueueEvent(AbstractThreadPool threadPool,
                             java.lang.Runnable task)

This event may be fired when a task has been queued for processing.

Specified by:
onTaskQueueEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored
task - a unit of work to be processed

onTaskDequeueEvent

public void onTaskDequeueEvent(AbstractThreadPool threadPool,
                               java.lang.Runnable task)

This event may be fired when a task has been pulled from the queue and is about to be processed.

Specified by:
onTaskDequeueEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored
task - a unit of work that is about to be processed.

onTaskCompleteEvent

public void onTaskCompleteEvent(AbstractThreadPool threadPool,
                                java.lang.Runnable task)

This event may be fired when a dequeued task has completed processing.

Specified by:
onTaskCompleteEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored
task - the unit of work that has completed processing

onTaskQueueOverflowEvent

public void onTaskQueueOverflowEvent(AbstractThreadPool threadPool)

This event may be fired when the task queue of the AbstractThreadPool implementation has exceeded its configured size.

Specified by:
onTaskQueueOverflowEvent in interface ThreadPoolProbe
Parameters:
threadPool - the AbstractThreadPool being monitored


Copyright © 2012 Oracle Corporation. All Rights Reserved.