driver-core/src/main/com/mongodb/connection/ClusterDescription.java
@Deprecated
    public List<ServerDescription> getAnyPrimaryOrSecondary(final TagSet tagSet) {
        return getServersByPredicate(new Predicate() {
            public boolean apply(final ServerDescription serverDescription) {
                return (serverDescription.isPrimary() || serverDescription.isSecondary()) && serverDescription.hasTags(tagSet);
            }
        });
    }
@Deprecated
    public List<ServerDescription> getAnyPrimaryOrSecondary(final TagSet tagSet) {
        return getServersByPredicate(new Predicate() {
            public boolean apply(final ServerDescription serverDescription) {
                return (serverDescription.isPrimary() || serverDescription.isSecondary()) && serverDescription.hasTags(tagSet);
            }
        });
    }
Gets a list of all the primaries and secondaries in this cluster that match the given replica set tags.

@param tagSet a Set of replica set tags
@return a list of ServerDescriptions for all primary and secondary servers that contain all of the given tags
@deprecated Replace with a filter on ServerDescription in the caller