public class

MonitorInfoAdapter

extends Object
implements IMonitorInfoProvider
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.concurrent.MonitorInfoAdapter

Class Overview

Standard implementation of the IMonitorInfoProvider interface.

Summary

Public Constructors
MonitorInfoAdapter(long timeout, long probingPeriod)
Public Methods
long getProbingPeriod()
Get the current probing period.
long getTimeout()
Get the current timeout value.
void onInterrupt()
If timeout has elapsed, this method is called before the monitor attempts to interrupt the monitored thread.
void setProbingPeriod(long millis)
Set the period at which the monitored thread will be probed.
void setTimeout(long millis)
Set the timeout value that determines the maximum thread's lifetime.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.util.concurrent.IMonitorInfoProvider

Public Constructors

public MonitorInfoAdapter (long timeout, long probingPeriod)

Public Methods

public long getProbingPeriod ()

Get the current probing period.

public long getTimeout ()

Get the current timeout value.

public void onInterrupt ()

If timeout has elapsed, this method is called before the monitor attempts to interrupt the monitored thread.

public void setProbingPeriod (long millis)

Set the period at which the monitored thread will be probed. That method allows the probing period to be set dynamically, even during execution of said-thread.

Parameters
millis if <=0, then will use a default sane value

public void setTimeout (long millis)

Set the timeout value that determines the maximum thread's lifetime. That method allows the timeout to be set dynamically, even during execution of said-thread.

Parameters
millis can be <=0, means no timeout