void ReplicaSetTagConfig::_appendConstraint(
            const ReplicaSetTagPattern::TagCountConstraint& constraint,
            BSONObjBuilder* builder) const {

        _appendTagKey(constraint.getKeyIndex(), builder);
        builder->append("minCount", int(constraint.getMinCount()));
    }
Exemple #2
0
void ReplSetTagConfig::put(const ReplSetTag& tag, std::ostream& os) const {
    BSONObjBuilder builder;
    _appendTagKey(tag.getKeyIndex(), &builder);
    _appendTagValue(tag.getKeyIndex(), tag.getValueIndex(), &builder);
    os << builder.done();
}