Returns the ObjectNames of all child containers that are instances of ContainerBase. @return the ObjectNames of the managed child containers
()
| 1054 | * @return the ObjectNames of the managed child containers |
| 1055 | */ |
| 1056 | public ObjectName[] getChildren() { |
| 1057 | List<ObjectName> names; |
| 1058 | childrenLock.readLock().lock(); |
| 1059 | try { |
| 1060 | names = new ArrayList<>(children.size()); |
| 1061 | for (Container next : children.values()) { |
| 1062 | if (next instanceof ContainerBase) { |
| 1063 | names.add(next.getObjectName()); |
| 1064 | } |
| 1065 | } |
| 1066 | } finally { |
| 1067 | childrenLock.readLock().unlock(); |
| 1068 | } |
| 1069 | return names.toArray(new ObjectName[0]); |
| 1070 | } |
| 1071 | |
| 1072 | |
| 1073 | // -------------------- Background Thread -------------------- |