public enum ResourceType extends java.lang.Enum<ResourceType>
| Enum Constant and Description |
|---|
ALL
Denotes that all resources shall be accounted.
|
CPU_TIME
CPU time consumption.
|
FILE_IO
File I/O consumption.
|
MEMORY
Memory allocation.
|
NET_IO
Network I/O consumption.
|
NONE
Denotes that no resources shall be accounted.
|
| Modifier and Type | Field and Description |
|---|---|
static ResourceType[] |
SET_ALL
Defines a constant array for all resources (empty).
|
static ResourceType[] |
SET_ANYWAY
Defines a constant array resources for resources to be considered
anyway for instrumentation as no dedicated SUM information is provided
by the JVM.
|
static ResourceType[] |
SET_DEFAULT
Defines a constant array for the default resources all resources (empty).
|
static ResourceType[] |
SET_NONE
Defines a constant array for no resources (empty).
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(ResourceType[] resources,
ResourceType resource)
Returns whether
resources contains resource. |
static ResourceType[] |
ensureSubset(ResourceType[] source,
ResourceType[] target)
Ensures that the elements in
target are also in
source. |
static boolean |
isAll(ResourceType[] resources)
Returns whether
resources is ALL. |
static boolean |
isNone(ResourceType[] resources)
Returns whether
resources is NONE. |
static boolean |
isType(ResourceType[] resources,
ResourceType type)
Returns whether
resources is type. |
static ResourceType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ResourceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResourceType NONE
ALL.public static final ResourceType ALL
ALL.public static final ResourceType CPU_TIME
public static final ResourceType MEMORY
public static final ResourceType FILE_IO
public static final ResourceType NET_IO
public static final ResourceType[] SET_ALL
public static final ResourceType[] SET_DEFAULT
ALL.public static final ResourceType[] SET_NONE
public static final ResourceType[] SET_ANYWAY
public static ResourceType[] values()
for (ResourceType c : ResourceType.values()) System.out.println(c);
public static ResourceType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static final boolean isAll(ResourceType[] resources)
resources is ALL.resources - the resources to be searched fortrue if resources is ALL,
false elsepublic static final boolean isNone(ResourceType[] resources)
resources is NONE.resources - the resources to be searched fortrue if resources is NONE,
false elsepublic static final boolean isType(ResourceType[] resources, ResourceType type)
resources is type.resources - the resources to be searched fortype - the specific type to check fortrue if resources is type,
false elsepublic static final boolean contains(ResourceType[] resources, ResourceType resource)
resources contains resource.resources - the resources to be searched for resourceresource - the resource to search fortrue if resources contains
resource, false elsepublic static final ResourceType[] ensureSubset(ResourceType[] source, ResourceType[] target)
target are also in
source. Elements which are not in source
will not be in the result.source - the source set (to be used as maximum superset)target - the target settarget or a subset of target where
all elements are also present in source