|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.alfresco.bm.server.BMServer
public class BMServer
Top level Benchmark Server driver class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.alfresco.bm.config.ConfigConstants |
|---|
org.alfresco.bm.config.ConfigConstants.RunState |
| Field Summary |
|---|
| Fields inherited from interface org.alfresco.bm.config.ConfigConstants |
|---|
DEFAULT_RUNSTATE, DEFAULT_SERVER_ID, PATH_CLASSES, PATH_CLUSTERS, PATH_DEFINITION, PATH_JARS, PATH_LOADED, PATH_PROPERTIES, PATH_RUNS, PATH_SERVER, PATH_SERVERS, PATH_TESTS, PROP_CLUSTER, PROP_CONTROL_CLUSTER, PROP_CONTROL_RUN_STATE, PROP_EVENT_PROCESSOR_THREADS, PROP_MONGO_URI, PROP_SERVER_ID, PROP_TEST_NAME, PROP_TEST_RUN_FQN, PROP_TEST_RUN_NAME, SEPARATOR |
| Constructor Summary | |
|---|---|
BMServer(ConfigService configService,
String cluster)
Constructor as used by Spring context |
|
| Method Summary | |
|---|---|
void |
checkTestRunsForRestart()
Prompt the server to perform a check of the loaded test runs in case they have changed state. |
void |
childrenChanged(String path)
The children below the path have changed |
void |
dataChanged(String path,
boolean deleted)
Triggers a restart
whenever the cluster configuration change is made. |
org.springframework.context.support.AbstractApplicationContext |
getApplicationContext()
Get the application context that the server is using |
String |
getCluster()
Get the name of the cluster that the server will join |
org.alfresco.bm.config.ConfigConstants.RunState |
getDesiredRunState()
|
org.alfresco.bm.config.ConfigConstants.RunState |
getRunState()
|
String |
getServerId()
|
void |
handleNewSession()
|
void |
handleStateChanged(org.apache.zookeeper.Watcher.Event.KeeperState state)
Triggers a restart |
static void |
main(String... args)
Real main method |
void |
onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
Starts up application contexts as required. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Stores the application context for use by the tests. |
void |
setDesiredRunState(org.alfresco.bm.config.ConfigConstants.RunState runState)
Sets the desired run state and notifies listeners (main thread). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BMServer(ConfigService configService,
String cluster)
| Method Detail |
|---|
public static void main(String... args)
args - command line argumentspublic String getCluster()
public org.alfresco.bm.config.ConfigConstants.RunState getRunState()
public org.alfresco.bm.config.ConfigConstants.RunState getDesiredRunState()
public void setDesiredRunState(org.alfresco.bm.config.ConfigConstants.RunState runState)
runState - the desired server run statepublic org.springframework.context.support.AbstractApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareapplicationContext - the server's application context
org.springframework.beans.BeansExceptionpublic String getServerId()
public void handleStateChanged(org.apache.zookeeper.Watcher.Event.KeeperState state)
throws Exception
restart
handleStateChanged in interface org.I0Itec.zkclient.IZkStateListenerException
public void handleNewSession()
throws Exception
handleNewSession in interface org.I0Itec.zkclient.IZkStateListenerExceptionpublic void checkTestRunsForRestart()
public void dataChanged(String path,
boolean deleted)
restart
whenever the cluster configuration change is made. The entire server configuration is invalid.
dataChanged in interface ConfigDataListenerpath - full data path e.g. /alfresco/bm/clusters/default/propertiesdeleted - the data has been deletedpublic void childrenChanged(String path)
ConfigChildListener
childrenChanged in interface ConfigChildListenerpath - full data path e.g. /alfresco/bm/testspublic void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||