/** * removes the GMS instance that is cached from a prior initialization. This * is typically called only when GMS module is being shutdown by a lifecycle * action. * @param groupName Name of the Group */ public static void removeGMSModule(final String groupName){ if(groupName != null){ final String key = getCompositeKey(groupName); if(groups.containsKey(key)){ groups.remove(key); } } }
/** * removes the GMS instance that is cached from a prior initialization. This * is typically called only when GMS module is being shutdown by a lifecycle * action. * @param groupName Name of the Group */ public static void removeGMSModule(final String groupName){ if(groupName != null){ final String key = getCompositeKey(groupName); if(groups.containsKey(key)){ groups.remove(key); } } }
gms.initialize(serverToken, groupName, memberType, properties) ; memberToken = serverToken; groups.put(getCompositeKey(groupName), gms );
gms.initialize(serverToken, groupName, memberType, properties) ; memberToken = serverToken; groups.put(getCompositeKey(groupName), gms );
/** * This returns an instance of the GroupManagementService for a given * non-null group name. * @param groupName groupName * @return GroupManagementService * @throws GMSException - if the groupName is null * * @throws GMSNotEnabledException - If GMS is not enabled * @throws GMSNotInitializedException - If GMS is not initialized */ public static GroupManagementService getGMSModule(final String groupName) throws GMSNotEnabledException, GMSException, GMSNotInitializedException { if(groupName == null){ throw new GMSException(sm.get("ex.factory.start.missing.group")); } final String key = getCompositeKey(groupName); if(groups.containsKey(key)) return groups.get(key); else if(!isGMSEnabled(groupName)){ throw new GMSNotEnabledException(sm.get("ex.factory.get.gms.is.disabled", new Object[]{groupName})); } else { throw new GMSNotInitializedException(sm.get("ex.factory.get.not.init", new Object[]{groupName})); } } /**
/** * This returns an instance of the GroupManagementService for a given * non-null group name. * @param groupName groupName * @return GroupManagementService * @throws GMSException - if the groupName is null * * @throws GMSNotEnabledException - If GMS is not enabled * @throws GMSNotInitializedException - If GMS is not initialized */ public static GroupManagementService getGMSModule(final String groupName) throws GMSNotEnabledException, GMSException, GMSNotInitializedException { if(groupName == null){ throw new GMSException(sm.get("ex.factory.start.missing.group")); } final String key = getCompositeKey(groupName); if(groups.containsKey(key)) return groups.get(key); else if(!isGMSEnabled(groupName)){ throw new GMSNotEnabledException(sm.get("ex.factory.get.gms.is.disabled", new Object[]{groupName})); } else { throw new GMSNotInitializedException(sm.get("ex.factory.get.not.init", new Object[]{groupName})); } } /**