6 #ifndef SRC_IO_SERVER_MANAGER_H_
7 #define SRC_IO_SERVER_MANAGER_H_
24 template <
typename ServerType,
typename ServerPtrType>
31 std::scoped_lock lock(
mutex_);
40 std::scoped_lock lock(
mutex_);
54 const ServerPtrType &rhs)
const {
55 return lhs.get() < rhs.get();
58 typedef std::set<ServerPtrType, ServerPtrCmp>
ServerSet;
64 template <
typename ServerType,
typename ServerPtrType>
68 template <
typename ServerType,
typename ServerPtrType>
static void AddServer(ServerType *server)
static ServerSet server_ref_
std::set< ServerPtrType, ServerPtrCmp > ServerSet
static void DeleteServer(ServerType *server)
bool operator()(const ServerPtrType &lhs, const ServerPtrType &rhs) const