public class AvailableProcessorsNotificationInfo
extends java.lang.Object
OperatingSystemMXBean when the number
of available processors changes.
Specifically, this notifiation indicates that the value returned by
OperatingSystemMXBean.getAvailableProcessors()
has changed.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AVAILABLE_PROCESSORS_CHANGE |
| Constructor and Description |
|---|
AvailableProcessorsNotificationInfo(int newAvailableProcessors)
Constructs a new instance of this object.
|
| Modifier and Type | Method and Description |
|---|---|
static AvailableProcessorsNotificationInfo |
from(javax.management.openmbean.CompositeData cd)
Receives a
CompositeDatarepresenting a
AvailableProcessorsNotificationInfo object and attempts to
return the root AvailableProcessorsNotificationInfo
instance. |
int |
getNewAvailableProcessors()
Returns the new number of available processors after the change that
initiated this notification.
|
public static final java.lang.String AVAILABLE_PROCESSORS_CHANGE
public AvailableProcessorsNotificationInfo(int newAvailableProcessors)
newAvailableProcessors - the new number of processors availablepublic int getNewAvailableProcessors()
public static AvailableProcessorsNotificationInfo from(javax.management.openmbean.CompositeData cd)
CompositeDatarepresenting a
AvailableProcessorsNotificationInfo object and attempts to
return the root AvailableProcessorsNotificationInfo
instance.cd - a CompositeDate that represents a
AvailableProcessorsNotificationInfo.cd is non- null, returns a new
instance of AvailableProcessorsNotificationInfo.
If cd is null, returns
null.java.lang.IllegalArgumentException - if argument cd does not correspond to a
AvailableProcessorsNotificationInfo with the
following attribute:
newAvailableProcessors(
java.lang.Integer)