void ReplicaSetTagConfig::_appendConstraint( const ReplicaSetTagPattern::TagCountConstraint& constraint, BSONObjBuilder* builder) const { _appendTagKey(constraint.getKeyIndex(), builder); builder->append("minCount", int(constraint.getMinCount())); }
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(); }