Lines Matching defs:remoteWatcherId

54     uint32_t remoteWatcherId = 0;
58 int ret = GetRemoteWatcherId(remoteWatcherId);
61 RemoteWatcher *remoteWatcher = new RemoteWatcher(remoteWatcherId, watcher);
66 WATCHER_LOGI("Add remote watcher remoteWatcherId %u %u success", remoteWatcherId, id);
67 return remoteWatcherId;
70 int32_t WatcherManager::DelRemoteWatcher(uint32_t remoteWatcherId)
75 RemoteWatcher *remoteWatcher = GetRemoteWatcher(remoteWatcherId);
76 WATCHER_CHECK(remoteWatcher != nullptr, return 0, "Can not find watcher %u", remoteWatcherId);
79 WATCHER_LOGI("Del remote watcher remoteWatcherId %u", remoteWatcherId);
90 int32_t WatcherManager::AddWatcher(const std::string &keyPrefix, uint32_t remoteWatcherId)
95 auto remoteWatcher = GetRemoteWatcher(remoteWatcherId);
96 WATCHER_CHECK(remoteWatcher != nullptr, return -1, "Can not find remote watcher %d", remoteWatcherId);
110 SendLocalChange(keyPrefix, remoteWatcherId);
111 WATCHER_LOGI("Add watcher %s remoteWatcherId: %u groupId %u success",
112 keyPrefix.c_str(), remoteWatcherId, group->GetGroupId());
116 int32_t WatcherManager::DelWatcher(const std::string &keyPrefix, uint32_t remoteWatcherId)
122 auto remoteWatcher = GetRemoteWatcher(remoteWatcherId);
123 WATCHER_CHECK(remoteWatcher != nullptr, return 0, "Can not find watcher %s %d", keyPrefix.c_str(), remoteWatcherId);
126 WATCHER_LOGI("Delete watcher prefix %s remoteWatcherId %u", keyPrefix.c_str(), remoteWatcherId);
138 int32_t WatcherManager::RefreshWatcher(const std::string &keyPrefix, uint32_t remoteWatcherId)
142 WATCHER_LOGV("Refresh watcher %s remoteWatcherId: %u", keyPrefix.c_str(), remoteWatcherId);
143 auto remoteWatcher = GetRemoteWatcher(remoteWatcherId);
144 WATCHER_CHECK(remoteWatcher != nullptr, return 0, "Can not find watcher %s %d", keyPrefix.c_str(), remoteWatcherId);
150 SendLocalChange(keyPrefix, remoteWatcherId);
227 void WatcherManager::SendLocalChange(const std::string &keyPrefix, uint32_t remoteWatcherId)
231 uint32_t remoteWatcherId;
235 WATCHER_LOGI("SendLocalChange start keyPrefix '%s' remoteWatcherId %d", keyPrefix.c_str(), remoteWatcherId);
237 struct Context context = {buffer.data(), remoteWatcherId, keyPrefix, this};
251 auto remoteWatcher = context->watcherManagerPtr->GetRemoteWatcher(context->remoteWatcherId);
436 int WatcherManager::GetRemoteWatcherId(uint32_t &remoteWatcherId)
442 remoteWatcherId = remoteWatcherId_;
557 RemoteWatcherPtr WatcherManager::GetRemoteWatcher(uint32_t remoteWatcherId)
560 WatcherNodePtr node = remoteWatchers_->GetNode(remoteWatcherId);
588 WATCHER_LOGI("Delete param watcher remoteWatcherId %u group %u",