@Override public Set<ResourceEntry> getChildren(final String childType) { if (NODE.equals(childType)) { final Set<String> names = getChildrenNames(childType); final Set<ResourceEntry> result = new LinkedHashSet<>(names.size()); for (String name : names) { result.add(new ModClusterNodeResource(name, this.name, modClusterName)); } return result; } else if(LOAD_BALANCING_GROUP.equals(childType)) { final Set<String> names = getChildrenNames(childType); final Set<ResourceEntry> result = new LinkedHashSet<>(names.size()); for (String name : names) { result.add(new PlaceholderResource.PlaceholderResourceEntry(PathElement.pathElement(LOAD_BALANCING_GROUP, name))); } return result; } return Collections.emptySet(); }
resource.registerChild(JDBC_STATISTICS, new PlaceholderResource.PlaceholderResourceEntry(JDBC_STATISTICS)); resource.registerChild(POOL_STATISTICS, new PlaceholderResource.PlaceholderResourceEntry(JDBC_STATISTICS));
@Override public Set<ResourceEntry> getChildren(String childType) { if (ENTITYCACHE.equals(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); for (String name : getCacheRegionNames()) { result.add(new PlaceholderResource.PlaceholderResourceEntry(ENTITYCACHE, name)); } return result; } else if (ENTITY.equals(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); for (String name : getEntityNames()) { result.add(new PlaceholderResource.PlaceholderResourceEntry(ENTITY, name)); } return result; } else if (COLLECTION.equals(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); for (String name : getCollectionNames()) { result.add(new PlaceholderResource.PlaceholderResourceEntry(COLLECTION, name)); } return result; } else if (QUERYCACHE.equals(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); for (String name : getQueryNames()) { result.add(new PlaceholderResource.PlaceholderResourceEntry(QUERYCACHE, name)); } return result; } else { return super.getChildren(childType); } }
@Override public Set<ResourceEntry> getChildren(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); Statistics childStatistics = statistics.getChild(childType); for (String name : childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName))) { result.add(new PlaceholderResource.PlaceholderResourceEntry(childType, name)); } return result; } else { return super.getChildren(childType); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return Collections.emptySet(); } }
@Override public Set<String> getChildrenNames(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); Set<String>result = new HashSet<String>(); for(String name:childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName))) { result.add(name); } return result; } else { return super.getChildrenNames(childType); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return Collections.emptySet(); } }
@Override public Set<ResourceEntry> getChildren(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); Statistics childStatistics = statistics.getChild(childType); for (String name : childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName))) { result.add(new PlaceholderResource.PlaceholderResourceEntry(childType, name)); } return result; } else { return super.getChildren(childType); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return Collections.emptySet(); } }
@Override public Set<String> getChildrenNames(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); Set<String>result = new HashSet<String>(); for(String name:childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName))) { result.add(name); } return result; } else { return super.getChildrenNames(childType); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return Collections.emptySet(); } }
@Override public boolean hasChild(PathElement element) { try { Statistics statistics = getStatistics(); // if element key matches, check if element value also matches if (statistics.getChildrenNames().contains(element.getKey())) { Statistics childStatistics = statistics.getChild(element.getKey()); return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue()); } else { return super.hasChild(element); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return false; } }
@Override public Resource getChild(PathElement element) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(element.getKey())) { Statistics childStatistics = statistics.getChild(element.getKey()); return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue()) ? PlaceholderResource.INSTANCE : null; } else { return super.getChild(element); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return super.getChild(element); } }
@Override public Set<ResourceEntry> getChildren(final String childType) { if (NODE.equals(childType)) { final Set<String> names = getChildrenNames(childType); final Set<ResourceEntry> result = new LinkedHashSet<>(names.size()); for (String name : names) { result.add(new ModClusterNodeResource(name, this.name, modClusterName)); } return result; } else if(LOAD_BALANCING_GROUP.equals(childType)) { final Set<String> names = getChildrenNames(childType); final Set<ResourceEntry> result = new LinkedHashSet<>(names.size()); for (String name : names) { result.add(new PlaceholderResource.PlaceholderResourceEntry(PathElement.pathElement(LOAD_BALANCING_GROUP, name))); } return result; } return Collections.emptySet(); }
@Override public Set<ResourceEntry> getChildren(String childType) { if (CORE_ADDRESS.equals(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); for (String name : getCoreAddressNames()) { result.add(new CoreAddressResource.CoreAddressResourceEntry(name, getManagementService())); } return result; } else if (RUNTIME_QUEUE.equals(childType)) { Set<ResourceEntry> result = new LinkedHashSet<ResourceEntry>(); for (String name : getCoreQueueNames()) { result.add(new PlaceholderResource.PlaceholderResourceEntry(RUNTIME_QUEUE, name)); } return result; } else { return delegate.getChildren(childType); } }
@Override public Set<ResourceEntry> getChildren(String childType) { if (CORE_ADDRESS.equals(childType)) { Set<ResourceEntry> result = new HashSet<ResourceEntry>(); for (String name : getCoreAddressNames()) { result.add(new CoreAddressResource.CoreAddressResourceEntry(name, getManagementService())); } return result; } else if (RUNTIME_QUEUE.equals(childType)) { Set<ResourceEntry> result = new LinkedHashSet<ResourceEntry>(); for (String name : getCoreQueueNames()) { result.add(new PlaceholderResource.PlaceholderResourceEntry(RUNTIME_QUEUE, name)); } return result; } else { return delegate.getChildren(childType); } }
@Override public Resource getChild(PathElement element) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(element.getKey())) { Statistics childStatistics = statistics.getChild(element.getKey()); return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue()) ? PlaceholderResource.INSTANCE : null; } else { return super.getChild(element); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return super.getChild(element); } }
@Override public boolean hasChild(PathElement element) { try { Statistics statistics = getStatistics(); // if element key matches, check if element value also matches if (statistics.getChildrenNames().contains(element.getKey())) { Statistics childStatistics = statistics.getChild(element.getKey()); return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue()); } else { return super.hasChild(element); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return false; } }
@Override public Set<ResourceEntry> getChildren(final String childType) { if (NODE.equals(childType)) { final Set<String> names = getChildrenNames(childType); final Set<ResourceEntry> result = new LinkedHashSet<>(names.size()); for (String name : names) { result.add(new ModClusterNodeResource(name, this.name, modClusterName)); } return result; } else if(LOAD_BALANCING_GROUP.equals(childType)) { final Set<String> names = getChildrenNames(childType); final Set<ResourceEntry> result = new LinkedHashSet<>(names.size()); for (String name : names) { result.add(new PlaceholderResource.PlaceholderResourceEntry(PathElement.pathElement(LOAD_BALANCING_GROUP, name))); } return result; } return Collections.emptySet(); }
@Override public boolean hasChildren(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); return childStatistics != null && childStatistics.getNames().size() > 0; } else { return super.hasChildren(childType); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return false; } }
@Override public boolean hasChildren(String childType) { try { Statistics statistics = getStatistics(); if (statistics.getChildrenNames().contains(childType)) { Statistics childStatistics = statistics.getChild(childType); return childStatistics != null && childStatistics.getNames().size() > 0; } else { return super.hasChildren(childType); } } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return false; } }
@Override public Set<String> getChildTypes() { try { Set<String> result = new HashSet<String>(super.getChildTypes()); Statistics statistics = getStatistics(); result.addAll(statistics.getChildrenNames()); return result; } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return Collections.emptySet(); } }
@Override public boolean hasChild(PathElement element) { if (ENTITYCACHE.equals(element.getKey())) { return hasCacheRegion(element); } else if (ENTITY.equals(element.getKey())) { return hasEntity(element); } else if (COLLECTION.equals(element.getKey())) { return hasCollection(element); } else if (QUERYCACHE.equals(element.getKey())) { return hasQuery(element); } else { return super.hasChild(element); } }
@Override public Set<String> getChildTypes() { try { Set<String> result = new HashSet<String>(super.getChildTypes()); Statistics statistics = getStatistics(); result.addAll(statistics.getChildrenNames()); return result; } catch (RuntimeException e) { // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException) // WFLY-10413 : also make sure to catch HibernateExceptions ROOT_LOGGER.unexpectedStatisticsProblem(e); return Collections.emptySet(); } }