Universal Messaging 9.8 | Administration Guide | Universal Messaging Enterprise Manager | Administration Using Enterprise Manager | Scheduling | Universal Messaging Scheduling : Cluster Triggers Example
 
Universal Messaging Scheduling : Cluster Triggers Example

/*
This script tests the cluster triggers. It is assumed the cluster is created with 4 realms
named realm1, realm2, realm3, realm4
*/

scheduler myCluster{

declare Cluster myNode1("realm1");
declare Cluster myNode2("realm2");
declare Cluster myNode3("realm3");
declare Cluster myNode4("realm4");

/*
This will trigger when realm1 is online to the cluster
*/
when ( myNode1.isOnline == true ){
Logger.report("Realm1 online");
}

/*
This can also be written as
*/
when ( Cluster.isOnline("realm1") == true ){
Logger.report("Realm1 online");
}

when ( myNode2.isOnline == true ){
Logger.report("Realm2 online");
}

when ( myNode3.isOnline ==true ){
Logger.report("Realm3 online");
}

when ( myNode4.isOnline == true ){
Logger.report("Realm4 online");
}

when ( Cluster.hasQuorum == true ){
Logger.report("Cluster now has quorum and is running" );
}

when ( Cluster.isMaster == true){
Logger.report("This local realm is the master realm of the cluster");
}

}

Copyright © 2013-2015 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.