- java.lang.Object
 - 
- jdk.management.resource.ResourceType
 
 
- 
@Deprecated(since="10", forRemoval=true) public class ResourceType extends Object
Deprecated, for removal: This API element is subject to removal in a future version.Resource Management is deprecated for removal with no replacement.A ResourceType with a name. The resource name is an opaque string and is not localized. A number of commonResourceTypes are defined.ResourceTypes may also be created byof(java.lang.String).- Since:
 - 8u40
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static ResourceTypeDATAGRAM_OPENDeprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_OPEN - number of open datagram sockets.static ResourceTypeDATAGRAM_READDeprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_READ - number of bytes of datagrams read.static ResourceTypeDATAGRAM_RECEIVEDDeprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_RECIEVED - number of datagrams received.static ResourceTypeDATAGRAM_SENTDeprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_SENT - number of datagrams sent.static ResourceTypeDATAGRAM_WRITEDeprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_WRITE - number of bytes of datagrams written.static ResourceTypeFILE_OPENDeprecated, for removal: This API element is subject to removal in a future version.FILE_OPEN - number of open files.static ResourceTypeFILE_READDeprecated, for removal: This API element is subject to removal in a future version.FILE_READ - number of bytes read from files.static ResourceTypeFILE_WRITEDeprecated, for removal: This API element is subject to removal in a future version.FILE_WRITE - number of bytes written to files.static ResourceTypeFILEDESCRIPTOR_OPENDeprecated, for removal: This API element is subject to removal in a future version.FILEDESCRIPTOR_OPEN - number of open file descriptors.static ResourceTypeHEAP_ALLOCATEDDeprecated, for removal: This API element is subject to removal in a future version.HEAP_ALLOCATED - running total of heap allocations in bytes.static ResourceTypeHEAP_RETAINEDDeprecated, for removal: This API element is subject to removal in a future version.HEAP_RETAINED - number of bytes of heap memory in use.static ResourceTypeSOCKET_OPENDeprecated, for removal: This API element is subject to removal in a future version.SOCKET_OPEN - number of open sockets.static ResourceTypeSOCKET_READDeprecated, for removal: This API element is subject to removal in a future version.SOCKET_READ - number of bytes read from sockets.static ResourceTypeSOCKET_WRITEDeprecated, for removal: This API element is subject to removal in a future version.SOCKET_WRITE - number of bytes written to sockets.static ResourceTypeSTDERR_WRITEDeprecated, for removal: This API element is subject to removal in a future version.STDERR_WRITE - number of bytes written to the standard error stream.static ResourceTypeSTDIN_READDeprecated, for removal: This API element is subject to removal in a future version.STDIN_READ - number of bytes read from the standard input stream.static ResourceTypeSTDOUT_WRITEDeprecated, for removal: This API element is subject to removal in a future version.STDOUT_WRITE - number of bytes written to the standard output stream.static ResourceTypeTHREAD_CPUDeprecated, for removal: This API element is subject to removal in a future version.THREAD_CPU - amount of cpu time used by threads, in nanoseconds.static ResourceTypeTHREAD_CREATEDDeprecated, for removal: This API element is subject to removal in a future version.THREAD_CREATED - number of threads created and active. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether some other object is "equal to" this one based on the name.StringgetName()Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of the resource.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this ResourceType based on the name.static ResourceTypeof(String name)Deprecated, for removal: This API element is subject to removal in a future version.Returns a ResourceType for the named resource. 
 - 
 
- 
- 
Field Detail
- 
FILE_OPEN
public static final ResourceType FILE_OPEN
Deprecated, for removal: This API element is subject to removal in a future version.FILE_OPEN - number of open files. 
- 
FILE_READ
public static final ResourceType FILE_READ
Deprecated, for removal: This API element is subject to removal in a future version.FILE_READ - number of bytes read from files. 
- 
FILE_WRITE
public static final ResourceType FILE_WRITE
Deprecated, for removal: This API element is subject to removal in a future version.FILE_WRITE - number of bytes written to files. 
- 
STDERR_WRITE
public static final ResourceType STDERR_WRITE
Deprecated, for removal: This API element is subject to removal in a future version.STDERR_WRITE - number of bytes written to the standard error stream. 
- 
STDIN_READ
public static final ResourceType STDIN_READ
Deprecated, for removal: This API element is subject to removal in a future version.STDIN_READ - number of bytes read from the standard input stream. 
- 
STDOUT_WRITE
public static final ResourceType STDOUT_WRITE
Deprecated, for removal: This API element is subject to removal in a future version.STDOUT_WRITE - number of bytes written to the standard output stream. 
- 
SOCKET_OPEN
public static final ResourceType SOCKET_OPEN
Deprecated, for removal: This API element is subject to removal in a future version.SOCKET_OPEN - number of open sockets. 
- 
SOCKET_READ
public static final ResourceType SOCKET_READ
Deprecated, for removal: This API element is subject to removal in a future version.SOCKET_READ - number of bytes read from sockets. 
- 
SOCKET_WRITE
public static final ResourceType SOCKET_WRITE
Deprecated, for removal: This API element is subject to removal in a future version.SOCKET_WRITE - number of bytes written to sockets. 
- 
DATAGRAM_OPEN
public static final ResourceType DATAGRAM_OPEN
Deprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_OPEN - number of open datagram sockets. 
- 
DATAGRAM_RECEIVED
public static final ResourceType DATAGRAM_RECEIVED
Deprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_RECIEVED - number of datagrams received. 
- 
DATAGRAM_SENT
public static final ResourceType DATAGRAM_SENT
Deprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_SENT - number of datagrams sent. 
- 
DATAGRAM_READ
public static final ResourceType DATAGRAM_READ
Deprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_READ - number of bytes of datagrams read. 
- 
DATAGRAM_WRITE
public static final ResourceType DATAGRAM_WRITE
Deprecated, for removal: This API element is subject to removal in a future version.DATAGRAM_WRITE - number of bytes of datagrams written. 
- 
THREAD_CREATED
public static final ResourceType THREAD_CREATED
Deprecated, for removal: This API element is subject to removal in a future version.THREAD_CREATED - number of threads created and active. 
- 
THREAD_CPU
public static final ResourceType THREAD_CPU
Deprecated, for removal: This API element is subject to removal in a future version.THREAD_CPU - amount of cpu time used by threads, in nanoseconds. 
- 
HEAP_RETAINED
public static final ResourceType HEAP_RETAINED
Deprecated, for removal: This API element is subject to removal in a future version.HEAP_RETAINED - number of bytes of heap memory in use. 
- 
HEAP_ALLOCATED
public static final ResourceType HEAP_ALLOCATED
Deprecated, for removal: This API element is subject to removal in a future version.HEAP_ALLOCATED - running total of heap allocations in bytes. 
- 
FILEDESCRIPTOR_OPEN
public static final ResourceType FILEDESCRIPTOR_OPEN
Deprecated, for removal: This API element is subject to removal in a future version.FILEDESCRIPTOR_OPEN - number of open file descriptors. 
 - 
 
- 
Method Detail
- 
of
public static ResourceType of(String name)
Deprecated, for removal: This API element is subject to removal in a future version.Returns a ResourceType for the named resource.- Parameters:
 name- the resource name- Returns:
 - a ResourceType for the named resource
 - Throws:
 IllegalArgumentException- if the length of the name is zero
 
- 
getName
public String getName()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the name of the resource. Resource names are opaque strings that are not localized.- Returns:
 - the name of the resource
 
 
- 
hashCode
public int hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this ResourceType based on the name.- Overrides:
 hashCodein classObject- Returns:
 - Returns a hash code value based on the hashCode of the name.
 - See Also:
 Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
 
- 
equals
public boolean equals(Object obj)
Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether some other object is "equal to" this one based on the name.- Overrides:
 equalsin classObject- Parameters:
 obj- the reference object with which to compare- Returns:
 - true if the pother object is a ResourceType and name of this ResourceType is the same as the name of the other ResourceType; false otherwise.
 - See Also:
 Object.hashCode(),HashMap
 
 - 
 
 -