public List<NodeRecord> loadNodes (String namespace, boolean includeShutdown)
    {
        // we specifically avoid caching this query because we want the servers to always see the
        // most up to date set of nodes
        Query<NodeRecord> query = from(NodeRecord.class).noCache();
        List<SQLExpression<?>> conditions = Lists.newArrayList();
        if (!StringUtil.isBlank(namespace)) {
            conditions.add(NodeRecord.NODE_NAME.like(namespace + "%"));
        }
        if (!includeShutdown) {
            conditions.add(Ops.not(NodeRecord.SHUTDOWN));
        }
        return (conditions.isEmpty() ? query : query.where(conditions)).select();
    }
public List < NodeRecord > loadNodes ( String namespace , boolean includeShutdown ) { Query < NodeRecord > query = from ( NodeRecord . class ) . noCache ( ) ; List < SQLExpression < ? > > conditions = Lists . newArrayList ( ) ; if ( ! StringUtil . isBlank ( namespace ) ) { conditions . add ( NodeRecord . NODE_NAME . like ( namespace + "%" ) ) ; } if ( ! includeShutdown ) { conditions . add ( Ops . not ( NodeRecord . SHUTDOWN ) ) ; } return ( conditions . isEmpty ( ) ? query : query . where ( conditions ) ) . select ( ) ; }
Returns a list of all nodes registered in the repository with names starting with the given
string, optionally including nodes that are explicitly shut down.