org.rhq.core.domain.measurement
Class ResourceAvailability

java.lang.Object
  extended by org.rhq.core.domain.measurement.ResourceAvailability
All Implemented Interfaces:
Serializable

public class ResourceAvailability
extends Object
implements Serializable

This entity represents the latest known availability data for a resource.

See Also:
Serialized Form

Field Summary
static String INSERT_BY_RESOURCE_IDS
           
static String QUERY_FIND_BY_RESOURCE_ID
           
static String QUERY_IS_AGENT_BACKFILLED
           
static String TABLE_NAME
           
static String UPDATE_BY_AGENT_ID
           
 
Constructor Summary
protected ResourceAvailability()
           
  ResourceAvailability(Resource resource, AvailabilityType type)
          Constructor for ResourceAvailability.
 
Method Summary
 boolean equals(Object obj)
           
 AvailabilityType getAvailabilityType()
          Indicates the availability status as either UP or DOWN; if null is returned, the status is unknown.
 Resource getResource()
           
 int hashCode()
           
 void setAvailabilityType(AvailabilityType availabilityType)
          Sets the availability status.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values

QUERY_FIND_BY_RESOURCE_ID

public static final String QUERY_FIND_BY_RESOURCE_ID
See Also:
Constant Field Values

UPDATE_BY_AGENT_ID

public static final String UPDATE_BY_AGENT_ID
See Also:
Constant Field Values

INSERT_BY_RESOURCE_IDS

public static final String INSERT_BY_RESOURCE_IDS
See Also:
Constant Field Values

QUERY_IS_AGENT_BACKFILLED

public static final String QUERY_IS_AGENT_BACKFILLED
See Also:
Constant Field Values
Constructor Detail

ResourceAvailability

protected ResourceAvailability()

ResourceAvailability

public ResourceAvailability(Resource resource,
                            AvailabilityType type)
Constructor for ResourceAvailability. If type is null, it will be considered unknown.

Parameters:
resource -
type -
Method Detail

getResource

public Resource getResource()

getAvailabilityType

public AvailabilityType getAvailabilityType()
Indicates the availability status as either UP or DOWN; if null is returned, the status is unknown.

Returns:
availability status

setAvailabilityType

public void setAvailabilityType(AvailabilityType availabilityType)
Sets the availability status. This can be null to indicate an "unknown" availability status.

Parameters:
availabilityType -

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.