During the development and review process of the disk health indicator we noticed that it was hard to understand. Since we learnt a lot from the first round of development we want to go through the code one more time and restructure it.
server/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
/**
     * Returns the nodes {@link DiscoveryNode}.
     *
     * @return discoveryNode of this node
     */
    @Nullable
    public DiscoveryNode node() {
        return this.node;
    }
    @Nullable
    public ShardRouting getByShardId(ShardId id) {
        return shards.get(id);
    }
    public boolean hasIndex(Index index) {
        return shardsByIndex.containsKey(index);
    }
    /**
     * Get the id of this node
     * @return id of the node
     */
    public String nodeId() {
        return this.nodeId;
    }
    public int size() {
        return shards.size();
    }
    /**
     * Add a new shard to this node
     * @param shard Shard to create on this Node
     */