当前位置: 首页>>代码示例>>C++>>正文


C++ DatabasePtr::getTraceLevels方法代码示例

本文整理汇总了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)
{
}
开发者ID:yuanbaopapa,项目名称:ice,代码行数:7,代码来源:RegistryAdminRouter.cpp

示例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";
    }
}
开发者ID:hadoop835,项目名称:ice,代码行数:14,代码来源:SessionI.cpp

示例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);
}
开发者ID:hadoop835,项目名称:ice,代码行数:48,代码来源:NodeSessionI.cpp

示例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);
}
开发者ID:465060874,项目名称:ice,代码行数:41,代码来源:ReplicaSessionI.cpp


注:本文中的DatabasePtr::getTraceLevels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。