public final class ServiceResourceStatistic
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
ServiceResourceStatistic(Ref serviceRef, java.lang.Exception exception)
Constructor
|
ServiceResourceStatistic(Ref serviceRef, java.util.Map<ResourceType,ResourceStatistic[]> resourceStatisticMap, java.lang.String[] missingServers, long collectionTimestamp)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ResourceStatistic[] |
getAllResourceStatistics()
Gets statistics for all resources.
|
long |
getCollectionTimestamp()
Gets the time the statistics were collected from the cluster.
|
java.lang.String[] |
getMissingServers()
Returns array of missing servers.
|
ResourceStatistic[] |
getResourceStatisticsByType(ResourceType type)
Gets statistics for all resources of specified type.
|
Ref |
getServiceRef()
Gets reference of service of which statistical information is available in this object.
|
public ServiceResourceStatistic(Ref serviceRef, java.util.Map<ResourceType,ResourceStatistic[]> resourceStatisticMap, java.lang.String[] missingServers, long collectionTimestamp) throws java.lang.IllegalArgumentException
serviceRef -resourceStatisticMap -missingServers -collectionTimestamp -java.lang.IllegalArgumentExceptionpublic ServiceResourceStatistic(Ref serviceRef, java.lang.Exception exception) throws java.lang.IllegalArgumentException
serviceRef -exception -java.lang.IllegalArgumentExceptionpublic Ref getServiceRef()
public long getCollectionTimestamp()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - If not collection timestamp is not set.public ResourceStatistic[] getAllResourceStatistics() throws InvalidServiceRefException, MonitoringNotEnabledException, MonitoringException
InvalidServiceRefException - If service reference is invalid or service is deleted.MonitoringNotEnabledException - If statistics not found.MonitoringException - If operation fails.public ResourceStatistic[] getResourceStatisticsByType(ResourceType type) throws InvalidServiceRefException, MonitoringNotEnabledException, MonitoringException
type - Resource type.InvalidServiceRefException - If service reference is invalid or service is deleted.MonitoringNotEnabledException - If statistics not found.MonitoringException - If operation fails.
public java.lang.String[] getMissingServers()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - If not collection timestamp is not set.