/** * Returns true if the server has the given tags. A server of either type {@code * ServerType.STANDALONE} or {@code ServerType.SHARD_ROUTER} is considered to have all tags, so * this method will always return true for instances of either of those types. * * @param desiredTags the tags * @return true if this server has the given tags */ public boolean hasTags(final TagSet desiredTags) { if (!ok) { return false; } if (type == STANDALONE || type == SHARD_ROUTER) { return true; } return tagSet.containsAll(desiredTags); }