Esempio n. 1
0
State::~State(void)
{
    StatePtr thisPtr(this);

    beginEditCP(thisPtr, ChunksFieldMask);
    clearChunks();
    endEditCP(thisPtr, ChunksFieldMask);
}
Esempio n. 2
0
void State::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
{
    Inherited::onDestroyAspect(uiId, uiAspect);

    StatePtr thisPtr(this);

    beginEditCP(thisPtr, ChunksFieldMask);
    clearChunks();
    endEditCP(thisPtr, ChunksFieldMask);
}
Esempio n. 3
0
 virtual ChannelFind::shared_pointer channelFind(std::string const & channelName,
         ChannelFindRequester::shared_pointer const & channelFindRequester)
 {
     bool found;
     {
         Lock guard(m_mutex);
         found = (m_services.find(channelName) != m_services.end()) ||
                 findWildService(channelName);
     }
     ChannelFind::shared_pointer thisPtr(shared_from_this());
     channelFindRequester->channelFindResult(Status::Ok, thisPtr, found);
     return thisPtr;
 }
StoragePtr StorageDistributed::create(
	const std::string & name_,
	NamesAndTypesListPtr columns_,
	const String & remote_database_,
	const String & remote_table_,
	std::shared_ptr<Cluster> & owned_cluster_,
	Context & context_)
{
	auto res = new StorageDistributed{
		name_, columns_, remote_database_,
		remote_table_, *owned_cluster_, context_
	};

	/// Захватываем владение объектом-кластером.
	res->owned_cluster = owned_cluster_;

	return res->thisPtr();
}
Esempio n. 5
0
    virtual ChannelFind::shared_pointer channelList(
        ChannelListRequester::shared_pointer const & channelListRequester)
    {
        if (!channelListRequester.get())
            throw std::runtime_error("null requester");

        PVStringArray::svector channelNames;
        {
            Lock guard(m_mutex);
            channelNames.reserve(m_services.size());
            for (RPCServiceMap::const_iterator iter = m_services.begin();
                    iter != m_services.end();
                    iter++)
                channelNames.push_back(iter->first);
        }

        ChannelFind::shared_pointer thisPtr(shared_from_this());
        channelListRequester->channelListResult(Status::Ok, thisPtr, freeze(channelNames), false);
        return thisPtr;
    }
void SSLConnectionBase<Final, Server>::
start() {
	socket_.async_handshake(asio::ssl::stream_base::server,
		strand_.wrap(bind(&SSLConnectionBase<Final, Server>::handleHandshake, thisPtr(),
			asio::placeholders::error)));
}