示例#1
0
文件: s3be.cpp 项目: rix0rrr/libbruce
Aws::S3::Model::GetObjectOutcomeCallable s3be::get_one(const libbruce::nodeid_t &id)
{
    GetObjectRequest request;
    request.SetBucket(m_bucket);
    request.SetKey(m_prefix + boost::lexical_cast<std::string>(id));

    return m_s3->GetObjectCallable(request);
}
示例#2
0
文件: s3be.cpp 项目: rix0rrr/libbruce
mempage s3be::get(const nodeid_t &id)
{
    //std::cerr << "GET " << id << std::endl;

    // Look in the cache
    {
        mempage ret;
        if (m_cache.get(id, &ret))
            return ret;
    }

    GetObjectRequest request;
    request.SetBucket(m_bucket);
    request.SetKey(m_prefix + boost::lexical_cast<std::string>(id));

    GetObjectOutcome response = m_s3->GetObject(request);
    return readGetOutcome(id, response);
}