public class ServerManagerBean extends Object implements ServerManagerLocal
Server instance that
some piece of code is currently executing on, use the ServerManagerBean.
This session bean determines the identity of the server it's running on by
reading the rhq.server.high-availability.name property from the
rhq-server.properties file.
The functionality provided here is useful when you need to execute something
on every server in the cloud, such as partitioned services and data.MAINTENANCE_MODE_ON_STARTUP_PROPERTY| Constructor and Description |
|---|
ServerManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
beat()
Updates server mtime to register active heart beat
|
int |
create(org.rhq.core.domain.cloud.Server server)
Persist the fully defined
|
void |
establishCurrentServerMode()
Checks current server mode against previous serverMode and takes any state change actions necessary.
|
List<org.rhq.core.domain.resource.Agent> |
getAgents()
At any time an active agent is communicating (either registered with, or connected to) a server in the cloud.
|
List<Integer> |
getAndClearAgentsWithStatus()
An Agent can have various status settings
Agent. |
boolean |
getAndClearServerStatus()
A Server can have various status settings
Server. |
String |
getIdentity()
Determine the identity (i.e.
|
org.rhq.core.domain.cloud.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 |
printWithTrace(String message) |
void |
scheduleServerHeartbeat() |
void |
syncEndpointAddress()
Synchronizes the endpoint address of this server with the host name or address found on the host machine.
|
public void scheduleServerHeartbeat()
scheduleServerHeartbeat in interface ServerManagerLocalpublic void handleHeartbeatTimer(javax.ejb.Timer timer)
handleHeartbeatTimer in interface ServerManagerLocalpublic int create(org.rhq.core.domain.cloud.Server server)
ServerManagerLocalcreate in interface ServerManagerLocalpublic String getIdentity()
ServerManagerLocalgetIdentity in interface ServerManagerLocalpublic List<org.rhq.core.domain.resource.Agent> getAgents()
ServerManagerLocalgetAgents in interface ServerManagerLocalpublic List<Integer> getAndClearAgentsWithStatus()
ServerManagerLocalAgent. The Status, when set, indicates
that this agent has some necessary work pending, typically processed by a periodic job.getAndClearAgentsWithStatus in interface ServerManagerLocalpublic boolean getAndClearServerStatus()
ServerManagerLocalServer. The Status, when set, indicates
that this server has some necessary work pending, typically processed by a periodic job.getAndClearServerStatus in interface ServerManagerLocalpublic org.rhq.core.domain.cloud.Server getServer()
throws ServerNotFoundException
ServerManagerLocalgetServer in interface ServerManagerLocalServerNotFoundException#getIdentity()}public void printWithTrace(String message)
public void establishCurrentServerMode()
ServerManagerLocalestablishCurrentServerMode in interface ServerManagerLocalpublic void syncEndpointAddress()
throws SyncEndpointAddressException
ServerManagerLocalServer.getAddress() then this server will be updated
with the value of this machine's host name/address.syncEndpointAddress in interface ServerManagerLocalSyncEndpointAddressExceptionpublic void beat()
ServerManagerLocalbeat in interface ServerManagerLocalCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.