Top Description Inners Methods
org.glassfish.grizzly.threadpool

public Interface ThreadPoolProbe

Known Direct Implementers
org.glassfish.grizzly.threadpool.ThreadPoolProbe.Adapter

Monitoring probe providing callbacks that may be invoked by Grizzly ThreadPoolInfo implementations.
Authors
gustav trede, Alexey Stashok
Since
1.9.19

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ThreadPoolProbe.Adapter

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

Method Summary

Modifier and TypeMethod and Description
public void
onMaxNumberOfThreadsEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
int
the maximum number of threads allowed in the ThreadPoolInfo
maxNumberOfThreads
)

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

public void
onTaskCancelEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
Runnable
a unit of work that has been canceled
task
)

This event may be fired when a dequeued task has been canceled.

public void
onTaskCompleteEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
Runnable
the unit of work that has completed processing
task
)

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

public void
onTaskDequeueEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
Runnable
a unit of work that is about to be processed.
task
)

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

public void
onTaskQueueEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
Runnable
a unit of work to be processed
task
)

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

public void
onTaskQueueOverflowEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
)

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

public void
onThreadAllocateEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
Thread
the thread that has been allocated
thread
)

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

public void
onThreadPoolStartEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
)

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

public void
onThreadPoolStopEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
)

This event may be fired when an ThreadPoolInfo implementation stops.

public void
onThreadReleaseEvent(ThreadPoolInfo
the ThreadPoolInfo being monitored
threadPool
,
Thread
the thread that is no longer being managed by the ThreadPoolInfo
thread
)

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

Method Detail

onMaxNumberOfThreadsEventback to summary
public void onMaxNumberOfThreadsEvent(ThreadPoolInfo threadPool, int maxNumberOfThreads)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

maxNumberOfThreads:int

the maximum number of threads allowed in the ThreadPoolInfo

onTaskCancelEventback to summary
public void onTaskCancelEvent(ThreadPoolInfo threadPool, Runnable task)

This event may be fired when a dequeued task has been canceled.

This event can occur during shutdownNow() invocation, where tasks are getting pulled out of thread pool queue and returned as the result of shutdownNow() method call.
Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

task:Runnable

a unit of work that has been canceled

onTaskCompleteEventback to summary
public void onTaskCompleteEvent(ThreadPoolInfo threadPool, Runnable task)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

task:Runnable

the unit of work that has completed processing

onTaskDequeueEventback to summary
public void onTaskDequeueEvent(ThreadPoolInfo threadPool, Runnable task)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

task:Runnable

a unit of work that is about to be processed.

onTaskQueueEventback to summary
public void onTaskQueueEvent(ThreadPoolInfo threadPool, Runnable task)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

task:Runnable

a unit of work to be processed

onTaskQueueOverflowEventback to summary
public void onTaskQueueOverflowEvent(ThreadPoolInfo threadPool)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

onThreadAllocateEventback to summary
public void onThreadAllocateEvent(ThreadPoolInfo threadPool, Thread thread)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

thread:Thread

the thread that has been allocated

onThreadPoolStartEventback to summary
public void onThreadPoolStartEvent(ThreadPoolInfo threadPool)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

onThreadPoolStopEventback to summary
public void onThreadPoolStopEvent(ThreadPoolInfo threadPool)

This event may be fired when an ThreadPoolInfo implementation stops.

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

onThreadReleaseEventback to summary
public void onThreadReleaseEvent(ThreadPoolInfo threadPool, Thread thread)

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

Parameters
threadPool:ThreadPoolInfo

the ThreadPoolInfo being monitored

thread:Thread

the thread that is no longer being managed by the ThreadPoolInfo

org.glassfish.grizzly.threadpool back to summary

public Class ThreadPoolProbe.Adapter

extends Object
implements ThreadPoolProbe
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.threadpool.ThreadPoolProbe
Annotations
@SuppressWarnings:UnusedDeclaration

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
onMaxNumberOfThreadsEvent(ThreadPoolInfo threadPool, int maxNumberOfThreads)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onMaxNumberOfThreadsEvent.

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

public void
onTaskCancelEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskCancelEvent.

This event may be fired when a dequeued task has been canceled.

public void
onTaskCompleteEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskCompleteEvent.

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

public void
onTaskDequeueEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskDequeueEvent.

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

public void
onTaskQueueEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskQueueEvent.

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

public void
onTaskQueueOverflowEvent(ThreadPoolInfo threadPool)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskQueueOverflowEvent.

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

public void
onThreadAllocateEvent(ThreadPoolInfo threadPool, Thread thread)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadAllocateEvent.

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

public void
onThreadPoolStartEvent(ThreadPoolInfo threadPool)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadPoolStartEvent.

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

public void
onThreadPoolStopEvent(ThreadPoolInfo threadPool)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadPoolStopEvent.

This event may be fired when an ThreadPoolInfo implementation stops.

public void
onThreadReleaseEvent(ThreadPoolInfo threadPool, Thread thread)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadReleaseEvent.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Adapterback to summary
public Adapter()

Method Detail

onMaxNumberOfThreadsEventback to summary
public void onMaxNumberOfThreadsEvent(ThreadPoolInfo threadPool, int maxNumberOfThreads)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onMaxNumberOfThreadsEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onMaxNumberOfThreadsEvent.

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

Annotations
@Override
onTaskCancelEventback to summary
public void onTaskCancelEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskCancelEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskCancelEvent.

This event may be fired when a dequeued task has been canceled.

This event can occur during shutdownNow() invocation, where tasks are getting pulled out of thread pool queue and returned as the result of shutdownNow() method call.
Annotations
@Override
onTaskCompleteEventback to summary
public void onTaskCompleteEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskCompleteEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskCompleteEvent.

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

Annotations
@Override
onTaskDequeueEventback to summary
public void onTaskDequeueEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskDequeueEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskDequeueEvent.

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

Annotations
@Override
onTaskQueueEventback to summary
public void onTaskQueueEvent(ThreadPoolInfo threadPool, Runnable task)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskQueueEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskQueueEvent.

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

Annotations
@Override
onTaskQueueOverflowEventback to summary
public void onTaskQueueOverflowEvent(ThreadPoolInfo threadPool)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskQueueOverflowEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onTaskQueueOverflowEvent.

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

Annotations
@Override
onThreadAllocateEventback to summary
public void onThreadAllocateEvent(ThreadPoolInfo threadPool, Thread thread)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadAllocateEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadAllocateEvent.

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

Annotations
@Override
onThreadPoolStartEventback to summary
public void onThreadPoolStartEvent(ThreadPoolInfo threadPool)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadPoolStartEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadPoolStartEvent.

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

Annotations
@Override
onThreadPoolStopEventback to summary
public void onThreadPoolStopEvent(ThreadPoolInfo threadPool)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadPoolStopEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadPoolStopEvent.

This event may be fired when an ThreadPoolInfo implementation stops.

Annotations
@Override
onThreadReleaseEventback to summary
public void onThreadReleaseEvent(ThreadPoolInfo threadPool, Thread thread)

Implements org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadReleaseEvent.

Doc from org.glassfish.grizzly.threadpool.ThreadPoolProbe.onThreadReleaseEvent.

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

Annotations
@Override