org.rhq.core.domain.cloud
Class Server

java.lang.Object
  extended by org.rhq.core.domain.cloud.Server
All Implemented Interfaces:
Serializable

public class Server
extends Object
implements Serializable

An RHQ server node in the cluster

See Also:
Serialized Form

Nested Class Summary
static class Server.OperationMode
           
static class Server.Status
           
 
Field Summary
static String QUERY_DELETE_BY_ID
           
static String QUERY_FIND_ALL
           
static String QUERY_FIND_ALL_CLOUD_MEMBERS
           
static String QUERY_FIND_ALL_COMPOSITES
           
static String QUERY_FIND_BY_AFFINITY_GROUP
           
static String QUERY_FIND_BY_NAME
           
static String QUERY_FIND_WITHOUT_AFFINITY_GROUP
           
static String QUERY_UPDATE_SET_STALE_DOWN
           
static String QUERY_UPDATE_STATUS_BY_NAME
           
static long serialVersionUID
           
 
Constructor Summary
Server()
           
Server(int serverId)
           
 
Method Summary
 void addStatus(Server.Status newStatus)
          If some subsystem makes a change to some data that this server cares about (as summarized by the various Server.Status elements), then that change should be added via this method.
 void clearStatus()
          If this status was non-zero, some scheduled job would have had to come along to perform some work on behalf of this server.
 boolean equals(Object obj)
           
 String getAddress()
           
 AffinityGroup getAffinityGroup()
           
 int getAgentCount()
           
 List<Agent> getAgents()
           
 int getComputePower()
           
 long getCtime()
           
 int getId()
           
 long getMtime()
           
 String getName()
           
 Server.OperationMode getOperationMode()
           
 int getPort()
           
 int getSecurePort()
           
 FailoverListComposite.ServerEntry getServerEntry()
           
 int getStatus()
          Returns 0 if this server is current.
 List<String> getStatusMessages()
           
 int hashCode()
           
 void setAddress(String address)
           
 void setAffinityGroup(AffinityGroup affinityGroup)
           
 void setAgents(List<Agent> agents)
           
 void setComputePower(int computePower)
           
 void setId(int id)
           
 void setMtime(long mtime)
           
 void setName(String name)
           
 void setOperationMode(Server.OperationMode operationMode)
           
 void setPort(int port)
           
 void setSecurePort(int securePort)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

QUERY_FIND_ALL

public static final String QUERY_FIND_ALL
See Also:
Constant Field Values

QUERY_FIND_ALL_COMPOSITES

public static final String QUERY_FIND_ALL_COMPOSITES
See Also:
Constant Field Values

QUERY_FIND_BY_NAME

public static final String QUERY_FIND_BY_NAME
See Also:
Constant Field Values

QUERY_FIND_ALL_CLOUD_MEMBERS

public static final String QUERY_FIND_ALL_CLOUD_MEMBERS
See Also:
Constant Field Values

QUERY_FIND_BY_AFFINITY_GROUP

public static final String QUERY_FIND_BY_AFFINITY_GROUP
See Also:
Constant Field Values

QUERY_FIND_WITHOUT_AFFINITY_GROUP

public static final String QUERY_FIND_WITHOUT_AFFINITY_GROUP
See Also:
Constant Field Values

QUERY_DELETE_BY_ID

public static final String QUERY_DELETE_BY_ID
See Also:
Constant Field Values

QUERY_UPDATE_SET_STALE_DOWN

public static final String QUERY_UPDATE_SET_STALE_DOWN
See Also:
Constant Field Values

QUERY_UPDATE_STATUS_BY_NAME

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

Server

public Server()

Server

public Server(int serverId)
Method Detail

getId

public int getId()

setId

public void setId(int id)

getName

public String getName()

setName

public void setName(String name)

getAddress

public String getAddress()

setAddress

public void setAddress(String address)

getPort

public int getPort()

setPort

public void setPort(int port)

getSecurePort

public int getSecurePort()

setSecurePort

public void setSecurePort(int securePort)

getComputePower

public int getComputePower()

setComputePower

public void setComputePower(int computePower)

getCtime

public long getCtime()

getMtime

public long getMtime()

setMtime

public void setMtime(long mtime)

getAffinityGroup

public AffinityGroup getAffinityGroup()

setAffinityGroup

public void setAffinityGroup(AffinityGroup affinityGroup)

getOperationMode

public Server.OperationMode getOperationMode()

setOperationMode

public void setOperationMode(Server.OperationMode operationMode)

getAgents

public List<Agent> getAgents()

setAgents

public void setAgents(List<Agent> agents)

getAgentCount

public int getAgentCount()

getServerEntry

public FailoverListComposite.ServerEntry getServerEntry()

getStatus

public int getStatus()
Returns 0 if this server is current. Otherwise, returns a mask of Server.Status elements corresponding to the updates that have occurred that are related to this server.

Returns:
0 if this server is current. Otherwise, returns a mask of Server.Status elements corresponding to the updates that have occurred that are related to this server.

clearStatus

public void clearStatus()
If this status was non-zero, some scheduled job would have had to come along to perform some work on behalf of this server. After that work is complete, the status can be reset (set to 0) signifying that no further work needs to be done on this server (as long as the status remains 0).


addStatus

public void addStatus(Server.Status newStatus)
If some subsystem makes a change to some data that this server cares about (as summarized by the various Server.Status elements), then that change should be added via this method. Periodically, a background job will come along, check the status, and possibly perform work on behalf of this server based on the type of change.


getStatusMessages

public List<String> getStatusMessages()

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-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.