public static void shutDownRedundancyZone ( String redundancyZone ) { if ( redundancyZone == null || redundancyZone . length ( ) == 0 ) throw new IllegalArgumentException ( "redundancyZone required" ) ; String objectNamePattern = "GemFire:type=Member,member=*" ; QueryExp exp = Query . eq ( Query . attr ( "RedundancyZone" ) , Query . value ( redundancyZone ) ) ; Collection < ObjectName > memberObjectNames = SingletonGemFireJmx . getJmx ( ) . searchObjectNames ( objectNamePattern , exp ) ; for ( ObjectName objectName : memberObjectNames ) { GemFireMgmt . shutDownMember ( objectName . getKeyProperty ( "member" ) ) ; } }
Shut down each member in a given RedundancyZone