| 188 | } |
| 189 | |
| 190 | Tag TagPartitionedLogSystem::getPseudoPopTag(Tag tag, ProcessClass::ClassType type) const { |
| 191 | switch (type) { |
| 192 | case ProcessClass::LogRouterClass: |
| 193 | if (tag.locality == tagLocalityLogRouter) { |
| 194 | ASSERT(pseudoLocalities.count(tagLocalityLogRouterMapped) > 0); |
| 195 | tag.locality = tagLocalityLogRouterMapped; |
| 196 | } |
| 197 | break; |
| 198 | |
| 199 | case ProcessClass::BackupClass: |
| 200 | if (tag.locality == tagLocalityLogRouter) { |
| 201 | ASSERT(pseudoLocalities.count(tagLocalityBackup) > 0); |
| 202 | tag.locality = tagLocalityBackup; |
| 203 | } |
| 204 | break; |
| 205 | |
| 206 | default: // This should be an error at caller site. |
| 207 | break; |
| 208 | } |
| 209 | return tag; |
| 210 | } |
| 211 | |
| 212 | bool TagPartitionedLogSystem::hasPseudoLocality(int8_t locality) const { |
| 213 | return pseudoLocalities.count(locality) > 0; |
no test coverage detected