PluginUser.cpp
Go to the documentation of this file.
1 #include "PluginUser.h"
2 #include "Plugin.h"
3 
4 
6 {
7 
9  {
10  addPlugin(plugin);
11  }
12 
13 
14  dto::RegisterServerResult PluginUser::registerServer(const dto::RegisterServerInput& input, const Ice::Current&)
15  {
16  std::scoped_lock lock(mnsMutex);
17  dto::RegisterServerResult result = plugin->mns.registerServer(input);
18  return result;
19  }
20 
21 
22  dto::RemoveServerResult PluginUser::removeServer(const dto::RemoveServerInput& input, const Ice::Current&)
23  {
24  std::scoped_lock lock(mnsMutex);
25  dto::RemoveServerResult result = plugin->mns.removeServer(input);
26  return result;
27  }
28 
29 
30  dto::GetAllRegisteredServersResult
32  {
33  std::scoped_lock lock(mnsMutex);
34  dto::GetAllRegisteredServersResult result = plugin->mns.getAllRegisteredServers();
35  return result;
36  }
37 
38 
39  dto::ResolveServerResult PluginUser::resolveServer(const dto::ResolveServerInput& input, const Ice::Current&)
40  {
41  std::scoped_lock lock(mnsMutex);
42  dto::ResolveServerResult result = plugin->mns.resolveServer(input);
43  return result;
44  }
45 
46 
47  // dto::WaitForServerResult PluginUser::waitForServer(const dto::WaitForServerInput& input, const Ice::Current&)
49  const AMD_MemoryNameSystemInterface_waitForServerPtr& future,
50  const dto::WaitForServerInput& input,
51  const Ice::Current&)
52  {
53  std::scoped_lock lock(mnsMutex);
54  plugin->mns.waitForServer_async(future, input);
55  }
56 
57 
59  {
60  return plugin->mns;
61  }
62 
63 
64  const MemoryNameSystem& PluginUser::mns() const
65  {
66  return plugin->mns;
67  }
68 
69 }
armarx::armem::mns::Registry::resolveServer
dto::ResolveServerResult resolveServer(const dto::ResolveServerInput &input)
Gets a server entry, if it is available.
Definition: Registry.cpp:126
armarx::armem::mns::MemoryNameSystem::waitForServer_async
void waitForServer_async(const AMD_MemoryNameSystemInterface_waitForServerPtr &future, const dto::WaitForServerInput &input)
Store the call in a container for later response.
Definition: MemoryNameSystem.cpp:8
armarx::armem::mns::plugins::PluginUser::removeServer
dto::RemoveServerResult removeServer(const dto::RemoveServerInput &input, const Ice::Current &=Ice::emptyCurrent) override
Definition: PluginUser.cpp:22
armarx::armem::mns::plugins::Plugin::mns
MemoryNameSystem mns
Definition: Plugin.h:20
armarx::armem::mns::Registry::removeServer
dto::RemoveServerResult removeServer(const dto::RemoveServerInput &input)
Remove a server entry.
Definition: Registry.cpp:64
armarx::armem::mns::plugins::PluginUser::registerServer
dto::RegisterServerResult registerServer(const dto::RegisterServerInput &input, const Ice::Current &=Ice::emptyCurrent) override
Definition: PluginUser.cpp:14
armarx::ManagedIceObject::addPlugin
PluginT * addPlugin(const std::string prefix="", ParamsT &&...params)
Definition: ManagedIceObject.h:182
Plugin.h
armarx::armem::mns::Registry::getAllRegisteredServers
dto::GetAllRegisteredServersResult getAllRegisteredServers()
Definition: Registry.cpp:108
armarx::armem::mns::plugins::PluginUser::mns
MemoryNameSystem & mns()
Definition: PluginUser.cpp:58
armarx::armem::mns::MemoryNameSystem
Definition: MemoryNameSystem.h:16
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:19
armarx::armem::mns::plugins::PluginUser::waitForServer_async
void waitForServer_async(const AMD_MemoryNameSystemInterface_waitForServerPtr &future, const dto::WaitForServerInput &input, const Ice::Current &=Ice::emptyCurrent) override
Definition: PluginUser.cpp:48
armarx::armem::mns::plugins::PluginUser::resolveServer
dto::ResolveServerResult resolveServer(const dto::ResolveServerInput &input, const Ice::Current &=Ice::emptyCurrent) override
Definition: PluginUser.cpp:39
armarx::armem::mns::plugins
Definition: Plugin.cpp:4
armarx::armem::mns::plugins::PluginUser::mnsMutex
std::mutex mnsMutex
Definition: PluginUser.h:44
armarx::armem::mns::MemoryNameSystem::registerServer
dto::RegisterServerResult registerServer(const dto::RegisterServerInput &input) override
Register a new memory server or update an existing entry.
Definition: MemoryNameSystem.cpp:44
armarx::armem::mns::plugins::PluginUser::getAllRegisteredServers
dto::GetAllRegisteredServersResult getAllRegisteredServers(const Ice::Current &) override
Definition: PluginUser.cpp:31
armarx::armem::mns::plugins::PluginUser::PluginUser
PluginUser()
Definition: PluginUser.cpp:8
PluginUser.h