Make all member collections final.
[jSite2.git] / src / net / pterodactylus / jsite / core / NodeManager.java
index 02f03b3..9cdc60d 100644 (file)
@@ -70,16 +70,19 @@ public class NodeManager implements Iterable<Node>, PropertyChangeListener, High
        private final NodeListenerSupport nodeListenerSupport = new NodeListenerSupport();
 
        /** All nodes. */
-       private List<Node> nodes = Collections.synchronizedList(new ArrayList<Node>());
+       private final List<Node> nodes = Collections.synchronizedList(new ArrayList<Node>());
 
        /** Map from node ID to node. */
-       private Map<String, Node> idNodes = Collections.synchronizedMap(new HashMap<String, Node>());
+       private final Map<String, Node> idNodes = Collections.synchronizedMap(new HashMap<String, Node>());
 
        /** All FCP connections. */
-       private Map<Node, HighLevelClient> nodeClients = Collections.synchronizedMap(new HashMap<Node, HighLevelClient>());
+       private final Map<Node, HighLevelClient> nodeClients = Collections.synchronizedMap(new HashMap<Node, HighLevelClient>());
 
        /** Maps nodes to high-level clients. */
-       private Map<HighLevelClient, Node> clientNodes = Collections.synchronizedMap(new HashMap<HighLevelClient, Node>());
+       private final Map<HighLevelClient, Node> clientNodes = Collections.synchronizedMap(new HashMap<HighLevelClient, Node>());
+
+       /** Collection of currently connected nodes. */
+       private final Set<Node> connectedNodes = Collections.synchronizedSet(new HashSet<Node>());
 
        /**
         * Creates a new FCP collector.