Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}