Make all member collections final.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 15 Nov 2008 01:48:20 +0000 (02:48 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 15 Nov 2008 01:48:20 +0000 (02:48 +0100)
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 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. */
 
        /** 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. */
 
        /** 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. */
 
        /** 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.
 
        /**
         * Creates a new FCP collector.