< prev index next >
src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java
Print this page
*** 51,66 ****
* </li>
* </ul>
*
* <p>
* A {@link CompositeData CompositeData} representing
! * the <tt>MemoryNotificationInfo</tt> object
* is stored in the
* {@link javax.management.Notification#setUserData user data}
* of a {@link javax.management.Notification notification}.
* The {@link #from from} method is provided to convert from
! * a <tt>CompositeData</tt> to a <tt>MemoryNotificationInfo</tt>
* object. For example:
*
* <blockquote><pre>
* Notification notif;
*
--- 51,66 ----
* </li>
* </ul>
*
* <p>
* A {@link CompositeData CompositeData} representing
! * the {@code MemoryNotificationInfo} object
* is stored in the
* {@link javax.management.Notification#setUserData user data}
* of a {@link javax.management.Notification notification}.
* The {@link #from from} method is provided to convert from
! * a {@code CompositeData} to a {@code MemoryNotificationInfo}
* object. For example:
*
* <blockquote><pre>
* Notification notif;
*
*** 76,86 ****
* ....
* }
* </pre></blockquote>
*
* <p>
! * The types of notifications emitted by <tt>MemoryMXBean</tt> are:
* <ul>
* <li>A {@link #MEMORY_THRESHOLD_EXCEEDED
* usage threshold exceeded notification}.
* <br>This notification will be emitted when
* the memory usage of a memory pool is increased and has reached
--- 76,86 ----
* ....
* }
* </pre></blockquote>
*
* <p>
! * The types of notifications emitted by {@code MemoryMXBean} are:
* <ul>
* <li>A {@link #MEMORY_THRESHOLD_EXCEEDED
* usage threshold exceeded notification}.
* <br>This notification will be emitted when
* the memory usage of a memory pool is increased and has reached
*** 117,127 ****
* This notification is emitted by {@link MemoryMXBean}.
* Subsequent crossing of the usage threshold value does not cause
* further notification until the memory usage has returned
* to become less than the usage threshold value.
* The value of this notification type is
! * <tt>java.management.memory.threshold.exceeded</tt>.
*/
public static final String MEMORY_THRESHOLD_EXCEEDED =
"java.management.memory.threshold.exceeded";
/**
--- 117,127 ----
* This notification is emitted by {@link MemoryMXBean}.
* Subsequent crossing of the usage threshold value does not cause
* further notification until the memory usage has returned
* to become less than the usage threshold value.
* The value of this notification type is
! * {@code java.management.memory.threshold.exceeded}.
*/
public static final String MEMORY_THRESHOLD_EXCEEDED =
"java.management.memory.threshold.exceeded";
/**
*** 131,147 ****
* collection usage threshold</a> after the Java virtual machine
* has expended effort in recycling unused objects in that
* memory pool.
* This notification is emitted by {@link MemoryMXBean}.
* The value of this notification type is
! * <tt>java.management.memory.collection.threshold.exceeded</tt>.
*/
public static final String MEMORY_COLLECTION_THRESHOLD_EXCEEDED =
"java.management.memory.collection.threshold.exceeded";
/**
! * Constructs a <tt>MemoryNotificationInfo</tt> object.
*
* @param poolName The name of the memory pool which triggers this notification.
* @param usage Memory usage of the memory pool.
* @param count The threshold crossing count.
*/
--- 131,147 ----
* collection usage threshold</a> after the Java virtual machine
* has expended effort in recycling unused objects in that
* memory pool.
* This notification is emitted by {@link MemoryMXBean}.
* The value of this notification type is
! * {@code java.management.memory.collection.threshold.exceeded}.
*/
public static final String MEMORY_COLLECTION_THRESHOLD_EXCEEDED =
"java.management.memory.collection.threshold.exceeded";
/**
! * Constructs a {@code MemoryNotificationInfo} object.
*
* @param poolName The name of the memory pool which triggers this notification.
* @param usage Memory usage of the memory pool.
* @param count The threshold crossing count.
*/
*** 205,248 ****
public long getCount() {
return count;
}
/**
! * Returns a <tt>MemoryNotificationInfo</tt> object represented by the
! * given <tt>CompositeData</tt>.
! * The given <tt>CompositeData</tt> must contain
* the following attributes:
* <blockquote>
* <table border summary="The attributes and the types the given CompositeData contains">
* <tr>
* <th align=left>Attribute Name</th>
* <th align=left>Type</th>
* </tr>
* <tr>
* <td>poolName</td>
! * <td><tt>java.lang.String</tt></td>
* </tr>
* <tr>
* <td>usage</td>
! * <td><tt>javax.management.openmbean.CompositeData</tt></td>
* </tr>
* <tr>
* <td>count</td>
! * <td><tt>java.lang.Long</tt></td>
* </tr>
* </table>
* </blockquote>
*
! * @param cd <tt>CompositeData</tt> representing a
! * <tt>MemoryNotificationInfo</tt>
*
! * @throws IllegalArgumentException if <tt>cd</tt> does not
! * represent a <tt>MemoryNotificationInfo</tt> object.
*
! * @return a <tt>MemoryNotificationInfo</tt> object represented
! * by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>;
! * <tt>null</tt> otherwise.
*/
public static MemoryNotificationInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
--- 205,248 ----
public long getCount() {
return count;
}
/**
! * Returns a {@code MemoryNotificationInfo} object represented by the
! * given {@code CompositeData}.
! * The given {@code CompositeData} must contain
* the following attributes:
* <blockquote>
* <table border summary="The attributes and the types the given CompositeData contains">
* <tr>
* <th align=left>Attribute Name</th>
* <th align=left>Type</th>
* </tr>
* <tr>
* <td>poolName</td>
! * <td>{@code java.lang.String}</td>
* </tr>
* <tr>
* <td>usage</td>
! * <td>{@code javax.management.openmbean.CompositeData}</td>
* </tr>
* <tr>
* <td>count</td>
! * <td>{@code java.lang.Long}</td>
* </tr>
* </table>
* </blockquote>
*
! * @param cd {@code CompositeData} representing a
! * {@code MemoryNotificationInfo}
*
! * @throws IllegalArgumentException if {@code cd} does not
! * represent a {@code MemoryNotificationInfo} object.
*
! * @return a {@code MemoryNotificationInfo} object represented
! * by {@code cd} if {@code cd} is not {@code null};
! * {@code null} otherwise.
*/
public static MemoryNotificationInfo from(CompositeData cd) {
if (cd == null) {
return null;
}
< prev index next >