Any new per-DR properties should go here.
| 73 | |
| 74 | // Any new per-DR properties should go here. |
| 75 | class DRConfig { |
| 76 | public: |
| 77 | DRConfig(UID uid = UID()) |
| 78 | : uid(uid), |
| 79 | configSpace(uidPrefixKey(LiteralStringRef("uid->config/").withPrefix(databaseBackupPrefixRange.begin), uid)) {} |
| 80 | DRConfig(Reference<Task> task) |
| 81 | : DRConfig(BinaryReader::fromStringRef<UID>(task->params[BackupAgentBase::keyConfigLogUid], Unversioned())) {} |
| 82 | |
| 83 | KeyBackedBinaryValue<int64_t> rangeBytesWritten() { return configSpace.pack(LiteralStringRef(__FUNCTION__)); } |
| 84 | |
| 85 | KeyBackedBinaryValue<int64_t> logBytesWritten() { return configSpace.pack(LiteralStringRef(__FUNCTION__)); } |
| 86 | |
| 87 | void clear(Reference<ReadYourWritesTransaction> tr) { tr->clear(configSpace.range()); } |
| 88 | |
| 89 | UID getUid() { return uid; } |
| 90 | |
| 91 | private: |
| 92 | UID uid; |
| 93 | Subspace configSpace; |
| 94 | }; |
| 95 | |
| 96 | namespace dbBackup { |
| 97 |
no outgoing calls
no test coverage detected