mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 18:02:31 +08:00
fixup! clang-format
This commit is contained in:
parent
99b030c2f6
commit
bd19845ef6
@ -49,4 +49,4 @@ public:
|
|||||||
bool isAtomic(std::string const& knobName) const override;
|
bool isAtomic(std::string const& knobName) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FDBCLIENT_CLIENTKNOBCCOLLECTION_H
|
#endif // FDBCLIENT_CLIENTKNOBCCOLLECTION_H
|
@ -73,4 +73,4 @@ public:
|
|||||||
static ConfigMutationRef createClearMutation(Arena, KeyRef);
|
static ConfigMutationRef createClearMutation(Arena, KeyRef);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FDBCLIENT_IKNOBCOLLECTION_H
|
#endif // FDBCLIENT_IKNOBCOLLECTION_H
|
@ -29,31 +29,33 @@
|
|||||||
// A list of knob key value pairs
|
// A list of knob key value pairs
|
||||||
class KnobKeyValuePairs {
|
class KnobKeyValuePairs {
|
||||||
public:
|
public:
|
||||||
using container_t = std::unordered_map<std::string, ParsedKnobValue>;
|
using container_t = std::unordered_map<std::string, ParsedKnobValue>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Here the knob value is directly stored, unlike KnobValue, for simplicity
|
// Here the knob value is directly stored, unlike KnobValue, for simplicity
|
||||||
container_t knobs;
|
container_t knobs;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Sets a value for a given knob
|
// Sets a value for a given knob
|
||||||
void set(const std::string& name, const ParsedKnobValue value);
|
void set(const std::string& name, const ParsedKnobValue value);
|
||||||
|
|
||||||
// Gets a list of knobs for given type
|
// Gets a list of knobs for given type
|
||||||
const container_t& getKnobs() const;
|
const container_t& getKnobs() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// For knobs, temporarily change the values, the original values will be recovered
|
// For knobs, temporarily change the values, the original values will be recovered
|
||||||
class KnobProtectiveGroup {
|
class KnobProtectiveGroup {
|
||||||
KnobKeyValuePairs overriddenKnobs;
|
KnobKeyValuePairs overriddenKnobs;
|
||||||
KnobKeyValuePairs originalKnobs;
|
KnobKeyValuePairs originalKnobs;
|
||||||
|
|
||||||
// Snapshots the current knob values base on those knob keys in overriddenKnobs
|
// Snapshots the current knob values base on those knob keys in overriddenKnobs
|
||||||
void snapshotOriginalKnobs();
|
void snapshotOriginalKnobs();
|
||||||
|
|
||||||
|
void assignKnobs(const KnobKeyValuePairs& overrideKnobs);
|
||||||
|
|
||||||
void assignKnobs(const KnobKeyValuePairs& overrideKnobs);
|
|
||||||
public:
|
public:
|
||||||
KnobProtectiveGroup(const KnobKeyValuePairs& overridenKnobs_);
|
KnobProtectiveGroup(const KnobKeyValuePairs& overridenKnobs_);
|
||||||
~KnobProtectiveGroup();
|
~KnobProtectiveGroup();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FDBSERVER_KNOBPROTECTIVEGROUPS_H
|
#endif // FDBSERVER_KNOBPROTECTIVEGROUPS_H
|
@ -27,4 +27,4 @@
|
|||||||
|
|
||||||
#define SERVER_KNOBS (&IKnobCollection::getGlobalKnobCollection().getServerKnobs())
|
#define SERVER_KNOBS (&IKnobCollection::getGlobalKnobCollection().getServerKnobs())
|
||||||
|
|
||||||
#endif // FDBSERVER_KNOBS_H
|
#endif // FDBSERVER_KNOBS_H
|
Loading…
x
Reference in New Issue
Block a user