// generic log event
class LogEvent {
- private:
- __u32 _type;
+public:
+ typedef __u32 EventType;
+
+private:
+ EventType _type;
uint64_t _start_off;
- static LogEvent *decode_event(bufferlist& bl, bufferlist::iterator& p, __u32 type);
+ static LogEvent *decode_event(bufferlist& bl, bufferlist::iterator& p, EventType type);
protected:
utime_t stamp;
friend class MDLog;
- public:
+public:
LogSegment *_segment;
LogEvent(int t)
virtual ~LogEvent() { }
string get_type_str() const;
- static __u32 str_to_type(std::string const &str);
- int get_type() const { return _type; }
- void set_type(int t) { _type = t; }
+ static EventType str_to_type(std::string const &str);
+ EventType get_type() const { return _type; }
+ void set_type(EventType t) { _type = t; }
uint64_t get_start_off() const { return _start_off; }
void set_start_off(uint64_t o) { _start_off = o; }