Usage of Collections.unmodifiableCollection is unsafe
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DataTreeCohortActorRegistry.java
index 4364e22d2ba85120e2c162d23f1547578caff589..c367f98f5aedd1b8282e96bb3e1549aa8023a30a 100644 (file)
@@ -48,6 +48,10 @@ class DataTreeCohortActorRegistry extends AbstractRegistrationTree<ActorRef> {
 
     private final Map<ActorRef, RegistrationTreeNode<ActorRef>> cohortToNode = new HashMap<>();
 
+    Collection<ActorRef> getCohortActors() {
+        return new ArrayList<>(cohortToNode.keySet());
+    }
+
     @SuppressWarnings("checkstyle:IllegalCatch")
     void registerCohort(final ActorRef sender, final RegisterCohort cohort) {
         takeLock();