NodeStatus[] rv = new NodeStatus[responses.size()]; for (int i = 0; i < rv.length; i++) rv[i] = (NodeStatus) responses.get(i); return rv;
List list = new ArrayList(responses.size()); for (int i = 0; i < responses.size(); i++) { NodeStatus ns = (NodeStatus) responses.get(i); if (ns != null) list.add(ns); } return (NodeStatus[]) list.toArray(new NodeStatus[list.size()]);
    public NodeStatus[] getGridStatus()    {        List responses = null;        try        {            responses = dispatcher.broadcastWithExceptionCheck(                    null, "_localStatus", NO_ARGS, NO_TYPES, GroupRequest.GET_ALL, TIMEOUT);        }        catch (GridException ge)        {            throw ge;        }        catch (Exception e)        {            throw new GridException(e);        }        NodeStatus[] rv = new NodeStatus[responses.size()];        for (int i = 0; i < rv.length; i++)            rv[i] = (NodeStatus) responses.get(i);        return rv;    }