Home
last modified time | relevance | path

Searched refs:watcher (Results 1 - 25 of 51) sorted by relevance

123

/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/common/
H A Ddistributeddb_thread_pool_test.cpp110 const std::shared_ptr<DistributedDBThreadPoolTest::TimerWatcher> &watcher, std::atomic<TaskId> &taskId) in MockSchedule()
112 ASSERT_NE(watcher, nullptr); in MockSchedule()
114 WillRepeatedly([watcher, &taskId](const Task &task, Duration time) { in MockSchedule()
115 watcher->AddCount(); in MockSchedule()
116 std::thread workingThread = std::thread([task, time, watcher]() { in MockSchedule()
119 watcher->DecCount(); in MockSchedule()
216 std::shared_ptr<TimerWatcher> watcher = std::make_shared<TimerWatcher>(); in HWTEST_F() local
218 ASSERT_NO_FATAL_FAILURE(MockSchedule(threadPoolPtr_, watcher, currentId)); in HWTEST_F()
244 watcher->SafeExit(); in HWTEST_F()
259 std::shared_ptr<TimerWatcher> watcher in HWTEST_F() local
109 MockSchedule(const std::shared_ptr<MockThreadPool> &threadPoolPtr, const std::shared_ptr<DistributedDBThreadPoolTest::TimerWatcher> &watcher, std::atomic<TaskId> &taskId) MockSchedule() argument
292 std::shared_ptr<TimerWatcher> watcher = std::make_shared<TimerWatcher>(); HWTEST_F() local
319 std::shared_ptr<TimerWatcher> watcher = std::make_shared<TimerWatcher>(); HWTEST_F() local
359 std::shared_ptr<TimerWatcher> watcher = std::make_shared<TimerWatcher>(); HWTEST_F() local
404 std::shared_ptr<TimerWatcher> watcher = std::make_shared<TimerWatcher>(); HWTEST_F() local
[all...]
/foundation/arkui/ace_engine_lite/frameworks/src/core/base/
H A Dlazy_load_manager.cpp63 void LazyLoadManager::RenderSingleLazyWatcher(const LazyLoadWatcher &watcher) const in RenderSingleLazyWatcher()
65 jerry_value_t attrName = watcher.GetAttrName(); in RenderSingleLazyWatcher()
66 jerry_value_t attrGetter = watcher.GetAttrGetter(); in RenderSingleLazyWatcher()
67 uint16_t attrKeyID = watcher.GetKeyId(); in RenderSingleLazyWatcher()
68 Component *component = ComponentUtils::GetComponentFromBindingObject(watcher.GetNativeElement()); in RenderSingleLazyWatcher()
103 LazyLoadWatcher *watcher = new LazyLoadWatcher(nativeElement, attrName, getter, keyId); in AddLazyLoadWatcher() local
104 if (watcher == nullptr) { in AddLazyLoadWatcher()
105 HILOG_ERROR(HILOG_MODULE_ACE, "create watcher errpr"); in AddLazyLoadWatcher()
108 lazyWatchersList_.PushBack(watcher); in AddLazyLoadWatcher()
109 // The state must be ready if any watcher laz in AddLazyLoadWatcher()
[all...]
H A Djs_fwk_common.cpp317 // arg1:target object watched, arg2:watcher callback, arg3:other argument
331 jerry_value_t watcher = CallJSFunction(watchFunction, appViewModel, args, ARG_LENGTH_WATCHER); in CallJSWatcher() local
333 return watcher; in CallJSWatcher()
834 void InsertWatcherCommon(Watcher *&head, const jerry_value_t watcher) in InsertWatcherCommon() argument
836 if (IS_UNDEFINED(watcher)) { in InsertWatcherCommon()
837 HILOG_ERROR(HILOG_MODULE_ACE, "watcher is undefined when inserting a watcher."); in InsertWatcherCommon()
842 jerry_value_t unsubscribe = jerryx_get_property_str(watcher, "unsubscribe"); in InsertWatcherCommon()
843 ReleaseJerryValue(CallJSFunction(unsubscribe, watcher, nullptr, 0), unsubscribe, watcher, VA_ARG_END_FLA in InsertWatcherCommon() local
864 jerry_value_t watcher = node->watcher; ClearWatchersCommon() local
866 ReleaseJerryValue(CallJSFunction(unsubscribe, watcher, nullptr, 0), unsubscribe, watcher, VA_ARG_END_FLAG); ClearWatchersCommon() local
1151 JSValue watcher = JSObject::Call(abilitySlice, ATTR_WATCH, args, ARG_LENGTH_WATCHER); CreateWatcher() local
[all...]
H A Dlazy_load_manager.h45 * @brief Cache watcher, need to calculate the name key by self
50 * @brief Cache watcher
55 * @brief Remove one lazy watcher from pending list by native element value
60 * @brief Render watcher at next TE task
74 void RenderSingleLazyWatcher(const LazyLoadWatcher &watcher) const;
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/src/
H A Dkvstore_service_death_notifier.cpp107 void KvStoreServiceDeathNotifier::AddServiceDeathWatcher(std::shared_ptr<KvStoreDeathRecipient> watcher) in AddServiceDeathWatcher() argument
111 auto ret = instance.serviceDeathWatchers_.insert(std::move(watcher)); in AddServiceDeathWatcher()
119 void KvStoreServiceDeathNotifier::RemoveServiceDeathWatcher(std::shared_ptr<KvStoreDeathRecipient> watcher) in RemoveServiceDeathWatcher() argument
123 auto it = instance.serviceDeathWatchers_.find(std::move(watcher)); in RemoveServiceDeathWatcher()
139 ZLOGI("watcher set size: %zu", instance.serviceDeathWatchers_.size()); in OnRemoteDied()
140 for (const auto &watcher : instance.serviceDeathWatchers_) { in OnRemoteDied()
141 if (watcher == nullptr) { in OnRemoteDied()
142 ZLOGI("watcher is nullptr"); in OnRemoteDied()
145 TaskExecutor::GetInstance().Execute([watcher] { in OnRemoteDied()
146 watcher in OnRemoteDied()
[all...]
H A Dkvstore_service_death_notifier.h36 // add watcher for server die msg.
37 static void AddServiceDeathWatcher(std::shared_ptr<KvStoreDeathRecipient> watcher);
38 // remove watcher for server die msg.
39 static void RemoveServiceDeathWatcher(std::shared_ptr<KvStoreDeathRecipient> watcher);
57 // add watcher for server die msg.
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/
H A Drdb_asset_loader_test.cpp147 std::shared_ptr<RdbWatcher> watcher = std::make_shared<RdbWatcher>(); in HWTEST_F() local
149 watcher->SetNotifier(notifier); in HWTEST_F()
150 EXPECT_EQ(watcher->notifier_, nullptr); in HWTEST_F()
151 auto result = watcher->OnChange(origin, primaryFields, std::move(values)); in HWTEST_F()
H A Dkvdb_general_store_test.cpp539 DistributedDataTest::MockGeneralWatcher watcher; in HWTEST_F() local
540 auto ret = store->Watch(GeneralWatcher::Origin::ORIGIN_CLOUD, watcher); in HWTEST_F()
542 ret = store->Unwatch(GeneralWatcher::Origin::ORIGIN_CLOUD, watcher); in HWTEST_F()
545 ret = store->Watch(GeneralWatcher::Origin::ORIGIN_ALL, watcher); in HWTEST_F()
547 ret = store->Watch(GeneralWatcher::Origin::ORIGIN_ALL, watcher); in HWTEST_F()
550 ret = store->Unwatch(GeneralWatcher::Origin::ORIGIN_ALL, watcher); in HWTEST_F()
552 ret = store->Unwatch(GeneralWatcher::Origin::ORIGIN_ALL, watcher); in HWTEST_F()
650 DistributedDataTest::MockGeneralWatcher watcher; in HWTEST_F() local
655 auto result = store->Watch(GeneralWatcher::Origin::ORIGIN_ALL, watcher); in HWTEST_F()
659 result = store->Unwatch(GeneralWatcher::Origin::ORIGIN_ALL, watcher); in HWTEST_F()
[all...]
H A Dkvdb_service_test.cpp314 std::shared_ptr<KVDBWatcher> watcher = std::make_shared<KVDBWatcher>(); in HWTEST_F() local
316 watcher->SetObserver(observer); in HWTEST_F()
317 EXPECT_EQ(watcher->observer_, nullptr); in HWTEST_F()
318 auto result = watcher->OnChange(origin, primaryFields, std::move(values)); in HWTEST_F()
322 result = watcher->OnChange(origin, fields, std::move(data)); in HWTEST_F()
355 std::shared_ptr<KVDBWatcher> watcher = std::make_shared<KVDBWatcher>(); in HWTEST_F() local
356 auto result = watcher->ConvertToEntries(values); in HWTEST_F()
373 std::shared_ptr<KVDBWatcher> watcher = std::make_shared<KVDBWatcher>(); in HWTEST_F() local
374 auto result = watcher->ConvertToKeys(values); in HWTEST_F()
/foundation/distributeddatamgr/data_object/frameworks/innerkitsimpl/src/adaptor/
H A Dasset_change_timer.cpp44 const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher) in OnAssetChanged()
46 StartTimer(sessionId, assetKey, watcher); in OnAssetChanged()
50 const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher) in StartTimer()
56 executor_->Schedule(std::chrono::milliseconds(WAIT_INTERVAL), ProcessTask(sessionId, assetKey, watcher)); in StartTimer()
63 const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher) in ProcessTask()
73 watcher->OnChanged(sessionId, { assetKey }); in ProcessTask()
43 OnAssetChanged( const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher) OnAssetChanged() argument
49 StartTimer( const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher) StartTimer() argument
62 ProcessTask( const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher) ProcessTask() argument
H A Dflat_object_storage_engine.cpp289 uint32_t FlatObjectStorageEngine::RegisterObserver(const std::string &key, std::shared_ptr<TableWatcher> watcher) in RegisterObserver() argument
308 delegate->RegisterObserver(tmpKey, DistributedDB::ObserverMode::OBSERVER_CHANGES_FOREIGN, watcher.get()); in RegisterObserver()
314 observerMap_.insert_or_assign(key, watcher); in RegisterObserver()
335 std::shared_ptr<TableWatcher> watcher = iter->second; in UnRegisterObserver() local
337 DistributedDB::DBStatus status = delegate->UnRegisterObserver(watcher.get()); in UnRegisterObserver()
347 uint32_t FlatObjectStorageEngine::SetStatusNotifier(std::shared_ptr<StatusWatcher> watcher) in SetStatusNotifier() argument
383 statusWatcher_ = watcher; in SetStatusNotifier()
/foundation/distributeddatamgr/data_object/frameworks/innerkitsimpl/include/adaptor/
H A Dasset_change_timer.h28 const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher);
36 void StartTimer(const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher);
39 const std::string &sessionId, const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher);
H A Ddistributed_objectstore_impl.h41 uint32_t Watch(DistributedObject *object, std::shared_ptr<ObjectWatcher> watcher) override;
68 const std::string &assetKey, std::shared_ptr<ObjectWatcher> watcher)>;
H A Dflat_object_storage_engine.h41 uint32_t RegisterObserver(const std::string &key, std::shared_ptr<TableWatcher> watcher) override;
43 uint32_t SetStatusNotifier(std::shared_ptr<StatusWatcher> watcher) override;
H A Dobject_storage_engine.h24 #include "watcher.h"
63 virtual uint32_t RegisterObserver(const std::string &key, std::shared_ptr<TableWatcher> watcher) = 0;
65 virtual uint32_t SetStatusNotifier(std::shared_ptr<StatusWatcher> watcher) = 0;
/foundation/distributeddatamgr/data_object/frameworks/jskitsimpl/include/adaptor/
H A Djs_watcher.h60 std::weak_ptr<JSWatcher> watcher, DistributedObjectStore *objectStore, DistributedObject *object);
76 StatusEventListener(std::weak_ptr<JSWatcher> watcher, const std::string &sessionId);
129 WatcherImpl(std::weak_ptr<JSWatcher> watcher) : watcher_(watcher) in WatcherImpl() argument
H A Dnotifier_impl.h28 void AddWatcher(std::string &sessionId, std::weak_ptr<JSWatcher> watcher);
/foundation/distributeddatamgr/data_object/frameworks/jskitsimpl/src/adaptor/
H A Djs_object_wrapper.cpp45 std::weak_ptr<JSWatcher> watcher = watcher_; in AddWatch() local
46 auto changeEventListener = new ChangeEventListener(watcher, objectStore_, object_); in AddWatch()
47 auto statusEventListener = new StatusEventListener(watcher, object_->GetSessionId()); in AddWatch()
H A Dnotifier_impl.cpp42 void NotifierImpl::AddWatcher(std::string &sessionId, std::weak_ptr<JSWatcher> watcher) in AddWatcher() argument
45 watchers_.insert_or_assign(sessionId, watcher); in AddWatcher()
69 LOG_ERROR("watcher expired"); in OnChanged()
H A Djs_watcher.cpp289 LOG_ERROR("watcher expired"); in OnChanged()
301 std::shared_ptr<WatcherImpl> watcher = std::make_shared<WatcherImpl>(watcher_); in Add() local
302 uint32_t ret = objectStore_->Watch(object_, watcher); in Add()
343 std::weak_ptr<JSWatcher> watcher, DistributedObjectStore *objectStore, DistributedObject *object) in ChangeEventListener()
344 : objectStore_(objectStore), object_(object), watcher_(watcher) in ChangeEventListener()
371 StatusEventListener::StatusEventListener(std::weak_ptr<JSWatcher> watcher, const std::string &sessionId) in StatusEventListener() argument
372 : watcher_(watcher), sessionId_(sessionId) in StatusEventListener()
342 ChangeEventListener( std::weak_ptr<JSWatcher> watcher, DistributedObjectStore *objectStore, DistributedObject *object) ChangeEventListener() argument
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/cloud/
H A Dcloud_db.cpp63 int32_t CloudDB::Watch(int32_t origin, Watcher &watcher) in Watch() argument
68 int32_t CloudDB::Unwatch(int32_t origin, Watcher &watcher) in Unwatch() argument
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/store/
H A Dauto_cache.cpp337 for (auto &watcher : watchers) { in OnChange()
339 if (watcher == nullptr) { in OnChange()
342 watcher->OnChange(origin, primaryFields, (remain != 0) ? ChangeInfo(values) : std::move(values)); in OnChange()
360 for (auto &watcher : watchers) { in OnChange()
362 if (watcher == nullptr) { in OnChange()
365 watcher->OnChange(origin, fields, (remain != 0) ? ChangeData(datas) : std::move(datas)); in OnChange()
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include/cloud/
H A Dcloud_db.h51 virtual int32_t Watch(int32_t origin, Watcher &watcher);
53 virtual int32_t Unwatch(int32_t origin, Watcher &watcher);
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/mock/
H A Dgeneral_store_mock.h43 int32_t Watch(int32_t origin, Watcher &watcher) override;
44 int32_t Unwatch(int32_t origin, Watcher &watcher) override;
H A Dgeneral_store_mock.cpp87 int32_t GeneralStoreMock::Watch(int32_t origin, Watcher &watcher) in Watch() argument
92 int32_t GeneralStoreMock::Unwatch(int32_t origin, Watcher &watcher) in Unwatch() argument

Completed in 13 milliseconds

123