util/cluster/RouteInfo.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      RouteInfo.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 ------------------------------------------------------------------------------*/
00006 #ifndef _UTIL_CLUSTER_ROUTEINFO_H
00007 #define _UTIL_CLUSTER_ROUTEINFO_H
00008 
00009 #include <util/xmlBlasterDef.h>
00010 #include <util/cluster/NodeId.h>
00011 #include <string>
00012 
00013 namespace org { namespace xmlBlaster { namespace util { namespace cluster {
00014 
00020 class Dll_Export RouteInfo
00021 {
00022 private:
00023    org::xmlBlaster::util::cluster::NodeId    nodeId_;
00024    int       stratum_;
00025    Timestamp timestamp_;
00026    bool      dirtyRead_;
00027 
00028 public:
00029 
00030    RouteInfo(org::xmlBlaster::util::Global& global);
00031 
00038    RouteInfo(const org::xmlBlaster::util::cluster::NodeId& nodeId, int stratum, Timestamp timestamp);
00039 
00043    void setNodeId(const org::xmlBlaster::util::cluster::NodeId& nodeId);
00044 
00048    org::xmlBlaster::util::cluster::NodeId getNodeId() const;
00049 
00054    std::string getId() const;
00055 
00060    void setStratum(int stratum);
00061 
00066    int getStratum() const;
00067 
00071    void setTimestamp(Timestamp timestamp);
00072 
00076    Timestamp getTimestamp() const;
00077 
00082    void setDirtyRead(bool dirtyRead);
00083 
00084    bool getDirtyRead() const;
00085 
00090    std::string toXml(const std::string& extraOffset="") const;
00091 };
00092 
00093 }}}}
00094 
00095 #endif