|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.linkedin.glu.agent.server.AgentMain
class AgentMain
This is the main class to start the agent.
Field Summary | |
---|---|
static java.lang.String |
MODULE
|
static Timespan |
PROCESS_TRACKER_HEARTBEAT
|
protected AgentImpl |
_agent
|
protected java.lang.String |
_agentName
|
protected AgentProperties |
_agentProperties
|
protected java.io.File |
_agentTempDir
|
protected java.lang.Object |
_config
|
protected DualWriteStorage |
_dwStorage
|
protected java.lang.String |
_fabric
|
protected java.lang.Object |
_lock
|
protected java.io.File |
_persistentPropertiesFile
|
protected long |
_pid
|
protected Agent |
_proxiedAgent
|
protected boolean |
_receivedShutdown
|
protected java.lang.Object |
_restServer
|
protected java.lang.Shutdown |
_shutdown
|
protected Sigar |
_sigar
|
protected Storage |
_storage
|
protected java.lang.Object |
_urlFactory
|
protected IZKClient |
_zkClient
|
protected java.lang.String |
_zooKeeperRoot
|
protected groovy.lang.Closure |
hostnameFactory
|
static java.lang.Object |
log
|
Constructor Summary | |
AgentMain()
|
Method Summary | |
---|---|
java.lang.Object
|
awaitTermination()
|
protected java.lang.String
|
computeAgentEphemeralPath()
|
protected java.lang.String
|
computeFabric(java.lang.Object config)
Computes the fabric |
protected groovy.lang.Closure
|
computeHostnameFactory(java.util.Properties config)
Use the |
protected java.lang.String
|
computeZKAgentFabricPath()
|
protected java.lang.String
|
computeZooKeeperStoragePath()
|
protected ShellImpl
|
createRootShell()
|
protected Shell
|
createShell(ShellImpl rootShell, java.lang.String root)
|
protected Sigar
|
createSigar()
Create Sigar. |
protected Storage
|
createStorage()
|
protected IZKClient
|
createZooKeeperClient(java.lang.Object config)
|
protected ZooKeeperStorage
|
createZooKeeperStorage()
|
protected java.io.File
|
fetchFile(java.lang.Object fileLocation, java.lang.Object checksum)
|
java.lang.String
|
getAgentName()
|
protected long
|
getAgentPid()
|
java.lang.String
|
getFabric()
|
protected java.lang.Object
|
getOneWayCodec()
|
protected java.lang.String
|
getPassword(java.lang.Object config, java.lang.String name)
|
java.lang.String
|
getPrefix()
|
protected java.lang.Object
|
getRemoteConfigCodec()
|
protected java.lang.Object
|
getTwoWayCodec()
|
java.lang.String
|
getZookeeperRoot()
|
void
|
init(java.lang.Object args)
|
java.io.File
|
loadPersistentProperties(java.util.Properties config)
Loads the persistent properties which will serve as default values for whatever is not specified. |
static void
|
main(java.lang.Object args)
|
void
|
onConnected()
|
void
|
onDisconnected()
|
protected java.lang.Object
|
readConfig(java.lang.Object url, java.util.Properties properties)
|
java.lang.Object
|
registerTerminationHandler()
|
java.io.File
|
savePersistentProperties(java.util.Properties config, AgentProperties agentProperties)
|
java.lang.Object
|
start()
|
java.lang.Object
|
startAndWait()
|
java.lang.Object
|
startRestServer()
|
protected void
|
toCanonicalPath(java.lang.Object config, java.lang.Object name)
Make sure that the paths are canonical (no .. or links) |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static final java.lang.String MODULE
public static final Timespan PROCESS_TRACKER_HEARTBEAT
protected AgentImpl _agent
protected java.lang.String _agentName
protected AgentProperties _agentProperties
protected java.io.File _agentTempDir
protected java.lang.Object _config
protected DualWriteStorage _dwStorage
protected java.lang.String _fabric
protected final java.lang.Object _lock
protected java.io.File _persistentPropertiesFile
protected long _pid
protected Agent _proxiedAgent
protected boolean _receivedShutdown
protected java.lang.Object _restServer
protected java.lang.Shutdown _shutdown
protected Sigar _sigar
protected Storage _storage
protected java.lang.Object _urlFactory
protected IZKClient _zkClient
protected java.lang.String _zooKeeperRoot
protected groovy.lang.Closure hostnameFactory
public static final java.lang.Object log
Constructor Detail |
---|
AgentMain()
Method Detail |
---|
java.lang.Object awaitTermination()
protected java.lang.String computeAgentEphemeralPath()
protected java.lang.String computeFabric(java.lang.Object config)
protected groovy.lang.Closure computeHostnameFactory(java.util.Properties config)
glu.agent.hostname
config value to determine how to compute
hostname.
protected java.lang.String computeZKAgentFabricPath()
protected java.lang.String computeZooKeeperStoragePath()
protected ShellImpl createRootShell()
protected Shell createShell(ShellImpl rootShell, java.lang.String root)
protected Sigar createSigar()
protected Storage createStorage()
protected IZKClient createZooKeeperClient(java.lang.Object config)
protected ZooKeeperStorage createZooKeeperStorage()
protected java.io.File fetchFile(java.lang.Object fileLocation, java.lang.Object checksum)
java.lang.String getAgentName()
protected long getAgentPid()
java.lang.String getFabric()
protected java.lang.Object getOneWayCodec()
protected java.lang.String getPassword(java.lang.Object config, java.lang.String name)
java.lang.String getPrefix()
protected java.lang.Object getRemoteConfigCodec()
protected java.lang.Object getTwoWayCodec()
java.lang.String getZookeeperRoot()
void init(java.lang.Object args)
java.io.File loadPersistentProperties(java.util.Properties config)
null
if we should
not store any persistent properties
static void main(java.lang.Object args)
void onConnected()
void onDisconnected()
protected java.lang.Object readConfig(java.lang.Object url, java.util.Properties properties)
java.lang.Object registerTerminationHandler()
java.io.File savePersistentProperties(java.util.Properties config, AgentProperties agentProperties)
java.lang.Object start()
java.lang.Object startAndWait()
java.lang.Object startRestServer()
protected void toCanonicalPath(java.lang.Object config, java.lang.Object name)
Groovy Documentation