- clusterGroupContainerService = FRMConsumerImpl.getClusterContainerService();
- container = FRMConsumerImpl.getContainer();
- }
-
- private boolean allocateGroupCaches() {
- if (this.clusterGroupContainerService == null) {
- logger.warn("Group: Un-initialized clusterGroupContainerService, can't create cache");
- return false;
- }
-
- try {
- clusterGroupContainerService.createCache("frm.originalSwGroupView",
- EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-
- clusterGroupContainerService.createCache("frm.installedSwGroupView",
- EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-
- clusterGroupContainerService.createCache("frm.inactiveGroups",
- EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-
- clusterGroupContainerService.createCache("frm.nodeGroups",
- EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
-
- // TODO for cluster mode
- /*
- * clusterGroupContainerService.createCache(WORK_STATUS_CACHE,
- * EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL,
- * IClusterServices.cacheMode.ASYNC));
- *
- * clusterGroupContainerService.createCache(WORK_ORDER_CACHE,
- * EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL,
- * IClusterServices.cacheMode.ASYNC));
- */
-
- } catch (CacheConfigException cce) {
- logger.error("Group CacheConfigException");
- return false;
-
- } catch (CacheExistException cce) {
- logger.error(" Group CacheExistException");
- }
-
- return true;
- }
-
- private void nonClusterGroupObjectCreate() {
- originalSwGroupView = new ConcurrentHashMap<GroupKey, Group>();
- installedSwGroupView = new ConcurrentHashMap<GroupKey, Group>();
- nodeGroups = new ConcurrentHashMap<Node, List<Group>>();
- inactiveGroups = new ConcurrentHashMap<GroupKey, Group>();
- }
-
- @SuppressWarnings({ "unchecked" })
- private boolean retrieveGroupCaches() {
- ConcurrentMap<?, ?> map;
-
- if (this.clusterGroupContainerService == null) {
- logger.warn("Group: un-initialized clusterGroupContainerService, can't retrieve cache");
- nonClusterGroupObjectCreate();
- return false;
- }