Previously the only way to get at the payload
of things like EUpdate and EOpen was to replay() them
(required a full running MDS) or to use downcasting
(yuck).
Signed-off-by: John Spray <john.spray@inktank.com>
class MDS;
class LogSegment;
+class EMetaBlob;
// generic log event
class LogEvent {
*/
virtual void replay(MDS *m) { assert(0); }
-
+ /**
+ * If the subclass embeds a MetaBlob, return it here so that
+ * tools can examine metablobs while traversing lists of LogEvent.
+ */
+ virtual EMetaBlob *get_metablob() {return NULL;}
};
inline ostream& operator<<(ostream& out, LogEvent& le) {
void update_segment();
void replay(MDS *mds);
+ EMetaBlob *get_metablob() {return &metablob;}
};
#endif
void update_segment();
void replay(MDS *mds);
+ EMetaBlob *get_metablob() {return &metablob;}
};
#endif