本文整理汇总了C++中DatabasePtr::getCommunicator方法的典型用法代码示例。如果您正苦于以下问题:C++ DatabasePtr::getCommunicator方法的具体用法?C++ DatabasePtr::getCommunicator怎么用?C++ DatabasePtr::getCommunicator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DatabasePtr
的用法示例。
在下文中一共展示了DatabasePtr::getCommunicator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FileCache
InternalRegistryI::InternalRegistryI(const RegistryIPtr& registry,
const DatabasePtr& database,
const ReapThreadPtr& reaper,
const WellKnownObjectsManagerPtr& wellKnownObjects,
ReplicaSessionManager& session) :
_registry(registry),
_database(database),
_reaper(reaper),
_wellKnownObjects(wellKnownObjects),
_fileCache(new FileCache(database->getCommunicator())),
_session(session)
{
Ice::PropertiesPtr properties = database->getCommunicator()->getProperties();
_nodeSessionTimeout = properties->getPropertyAsIntWithDefault("IceGrid.Registry.NodeSessionTimeout", 30);
_replicaSessionTimeout = properties->getPropertyAsIntWithDefault("IceGrid.Registry.ReplicaSessionTimeout", 30);
}
示例2:
AdminSessionFactory::AdminSessionFactory(const SessionServantManagerPtr& servantManager,
const DatabasePtr& database,
const ReapThreadPtr& reaper,
const RegistryIPtr& registry) :
_servantManager(servantManager),
_database(database),
_timeout(registry->getSessionTimeout()),
_reaper(reaper),
_registry(registry),
_filters(false)
{
if(_servantManager) // Not set if Glacier2 session manager adapter not enabled
{
Ice::PropertiesPtr props = database->getCommunicator()->getProperties();
const_cast<bool&>(_filters) = props->getPropertyAsIntWithDefault("IceGrid.Registry.AdminSessionFilters", 0) > 0;
}
}