00001 /*------------------------------------------------------------------------------ 00002 Name: NodeId.h 00003 Project: xmlBlaster.org 00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file 00005 Comment: Holds the unique name of a cluster node 00006 ------------------------------------------------------------------------------*/ 00007 00008 00017 #ifndef _UTIL_CLUSTER_NODEID_H 00018 #define _UTIL_CLUSTER_NODEID_H 00019 00020 #include <util/xmlBlasterDef.h> 00021 #include <string> 00022 #include <util/I_Log.h> 00023 00024 namespace org { namespace xmlBlaster { namespace util { namespace cluster { 00025 00026 class Dll_Export NodeId 00027 { 00028 private: 00029 const std::string ME; 00030 std::string id_; 00031 org::xmlBlaster::util::Global& global_; 00032 org::xmlBlaster::util::I_Log& log_; 00033 00034 public: 00035 NodeId(org::xmlBlaster::util::Global& global, const std::string& id); 00036 00037 NodeId(const NodeId& nodeId); 00038 00039 NodeId& operator =(const NodeId& nodeId); 00040 00041 std::string getId() const; 00042 00047 void setId(const std::string& id); 00048 00049 std::string toString() const; 00050 00054 bool operator <(const NodeId& nodeId) const; 00055 00056 bool operator ==(const NodeId& nodeId) const; 00057 00058 }; 00059 00060 }}}} // namespace 00061 00062 #endif