private static Map<String, List<Integer>> retrieveStats(ConnectionRegistry registry)
    {
        Map<String, List<Integer>> nodeStates = new HashMap<String, List<Integer>>();

        try {
            for (String id : registry.list()) {
                INode obj = registry.lookup(id);
                int[] rawStates = obj.getNodeState();

                List<Integer> states = new ArrayList<Integer>(rawStates.length);
                for (int i : rawStates)
                    states.add(i);

                nodeStates.put(id, states);
            }
        } catch (RemoteException e) {
            e.printStackTrace();
        }

        return nodeStates;
    }