org.rhq.enterprise.server.cloud.instance
Interface ServerManagerLocal

All Known Implementing Classes:
ServerManagerBean

public interface ServerManagerLocal

Author:
Joseph Marques, Jay Shaughnessy

Field Summary
static java.lang.String MAINTENANCE_MODE_ON_STARTUP_PROPERTY
          The system property (defined in the startup properties file) that indicates if we need to put the server into MM upon startup.
 
Method Summary
 void beat()
          Updates server mtime to register active heart beat
 int create(Server server)
          Persist the fully defined .
 void establishCurrentServerMode()
          Checks current server mode against previous serverMode and takes any state change actions necessary.
 java.util.List<Agent> getAgents()
          At any time an active agent is communicating (either registered with, or connected to) a server in the cloud.
 java.util.List<java.lang.Integer> getAndClearAgentsWithStatus()
          An Agent can have various status settings Agent.
 boolean getAndClearServerStatus()
          A Server can have various status settings Server.
 java.lang.String getIdentity()
          Determine the identity (i.e.
 Server getServer()
          Returns an object representing this server as it is known within the registered cloud of servers.
 void handleHeartbeatTimer(javax.ejb.Timer timer)
           
 void scheduleServerHeartbeat()
           
 

Field Detail

MAINTENANCE_MODE_ON_STARTUP_PROPERTY

static final java.lang.String MAINTENANCE_MODE_ON_STARTUP_PROPERTY
The system property (defined in the startup properties file) that indicates if we need to put the server into MM upon startup.

See Also:
Constant Field Values
Method Detail

scheduleServerHeartbeat

void scheduleServerHeartbeat()

handleHeartbeatTimer

void handleHeartbeatTimer(javax.ejb.Timer timer)

create

int create(Server server)
Persist the fully defined .

Parameters:
server -
Returns:
The internal Id of the new Server

getIdentity

java.lang.String getIdentity()
Determine the identity (i.e. Server Name) of this server by inspecting the configures system property. This is the mechanism used for a server to determine which server it is in the registered cloud servers.

Returns:
The server name for this server.

getAgents

java.util.List<Agent> getAgents()
At any time an active agent is communicating (either registered with, or connected to) a server in the cloud. Note that an agent that went down unexpectedly may still be referencing a server although it is not actively communicating.

Returns:
The list of Agents referencing this server.

getAndClearAgentsWithStatus

java.util.List<java.lang.Integer> getAndClearAgentsWithStatus()
An Agent can have various status settings Agent. The Status, when set, indicates that this agent has some necessary work pending, typically processed by a periodic job.

Returns:
The subset of agents referencing this server that currently have some Status set.

getAndClearServerStatus

boolean getAndClearServerStatus()
A Server can have various status settings Server. The Status, when set, indicates that this server has some necessary work pending, typically processed by a periodic job.

Returns:
whether or not this server had its Status set.

getServer

Server getServer()
                 throws ServerNotFoundException
Returns an object representing this server as it is known within the registered cloud of servers.

Returns:
object representing this server
Throws:
ServerNotFoundException
See Also:
#getIdentity()}

establishCurrentServerMode

void establishCurrentServerMode()
Checks current server mode against previous serverMode and takes any state change actions necessary. Note that a server can not be DOWN after this call since the call itself is evidence of the server running. So, this can take care of a server starting up.


beat

void beat()
Updates server mtime to register active heart beat



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