本文整理汇总了C++中DatabasePtr::getTraceLevels方法的典型用法代码示例。如果您正苦于以下问题:C++ DatabasePtr::getTraceLevels方法的具体用法?C++ DatabasePtr::getTraceLevels怎么用?C++ DatabasePtr::getTraceLevels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DatabasePtr
的用法示例。
在下文中一共展示了DatabasePtr::getTraceLevels方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AdminRouter
IceGrid::RegistryReplicaAdminRouter::RegistryReplicaAdminRouter(const string& name,
const DatabasePtr& database) :
AdminRouter(database->getTraceLevels()),
_name(name),
_database(database)
{
}
示例2: out
BaseSessionI::BaseSessionI(const string& id, const string& prefix, const DatabasePtr& database) :
_id(id),
_prefix(prefix),
_traceLevels(database->getTraceLevels()),
_database(database),
_destroyed(false),
_timestamp(IceUtil::Time::now(IceUtil::Time::Monotonic))
{
if(_traceLevels && _traceLevels->session > 0)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->sessionCat);
out << _prefix << " session `" << _id << "' created";
}
}
示例3: catch
NodeSessionI::NodeSessionI(const DatabasePtr& database,
const NodePrx& node,
const InternalNodeInfoPtr& info,
int timeout,
const LoadInfo& load) :
_database(database),
_traceLevels(database->getTraceLevels()),
_node(node),
_info(info),
_timeout(timeout),
_timestamp(IceUtil::Time::now(IceUtil::Time::Monotonic)),
_load(load),
_destroy(false)
{
__setNoDelete(true);
try
{
_database->getNode(info->name, true)->setSession(this);
ObjectInfo objInfo;
objInfo.type = Node::ice_staticId();
objInfo.proxy = _node;
_database->addInternalObject(objInfo, true); // Add or update previous node proxy.
_proxy = NodeSessionPrx::uncheckedCast(_database->getInternalAdapter()->addWithUUID(this));
}
catch(const NodeActiveException&)
{
__setNoDelete(false);
throw;
}
catch(...)
{
try
{
_database->removeInternalObject(_node->ice_getIdentity());
}
catch(const ObjectNotRegisteredException&)
{
}
_database->getNode(info->name)->setSession(0);
__setNoDelete(false);
throw;
}
__setNoDelete(false);
}
示例4: catch
ReplicaSessionI::ReplicaSessionI(const DatabasePtr& database,
const WellKnownObjectsManagerPtr& wellKnownObjects,
const InternalReplicaInfoPtr& info,
const InternalRegistryPrx& proxy,
int timeout) :
_database(database),
_wellKnownObjects(wellKnownObjects),
_traceLevels(database->getTraceLevels()),
_internalRegistry(proxy),
_info(info),
_timeout(timeout),
_timestamp(IceUtil::Time::now(IceUtil::Time::Monotonic)),
_destroy(false)
{
__setNoDelete(true);
try
{
_database->getReplicaCache().add(info->name, this);
ObserverTopicPtr obsv = _database->getObserverTopic(RegistryObserverTopicName);
RegistryObserverTopicPtr::dynamicCast(obsv)->registryUp(toRegistryInfo(_info));
_proxy = ReplicaSessionPrx::uncheckedCast(_database->getInternalAdapter()->addWithUUID(this));
}
catch(const ReplicaActiveException&)
{
__setNoDelete(false);
throw;
}
catch(...)
{
ObserverTopicPtr obsv = _database->getObserverTopic(RegistryObserverTopicName);
RegistryObserverTopicPtr::dynamicCast(obsv)->registryDown(_info->name);
_database->getReplicaCache().remove(_info->name, false);
__setNoDelete(false);
throw;
}
__setNoDelete(false);
}