16 #include <glog/logging.h>
62 VBucket(std::string initial_name, std::shared_ptr<Hermes>
const &
hermes,
106 Status Link(std::string blob_name, std::string bucket_name);
127 Status Unlink(std::string blob_name, std::string bucket_name);
130 bool ContainsBlob(std::string blob_name, std::string bucket_name);
137 size_t Get(
const std::string &name,
Bucket &bkt,
Blob &user_blob,
142 size_t Get(
const std::string &name,
Bucket &bkt,
Blob &user_blob);
146 size_t Get(
const std::string &name,
Bucket &bkt,
void *user_blob,
147 size_t blob_size,
const Context &ctx);
163 size_t Get(
const std::string &name,
Bucket *bkt,
void *user_blob,
164 size_t blob_size,
const Context &ctx);
212 template <
class Predicate>
Definition: hermes_status.h:80
A container for Blobs.
Definition: bucket.h:37
size_t Get(const std::string &name, Bucket *bkt, void *user_blob, size_t blob_size, const Context &ctx)
Retrieve a Blob into a user buffer.
size_t Get(const std::string &name, Bucket &bkt, Blob &user_blob, const Context &ctx)
Definition: vbucket.cc:169
std::shared_ptr< Hermes > hermes_
Definition: vbucket.h:44
void WaitForBackgroundFlush()
Definition: vbucket.cc:59
Status Destroy()
Destroy this VBucket.
Definition: vbucket.cc:339
Status Attach(Trait *trait)
Attach a Trait to this VBucket.
Definition: vbucket.cc:220
std::vector< std::string > GetLinks(Context &ctx)
Definition: vbucket.cc:205
Context ctx_
Definition: vbucket.h:46
Status Detach(Trait *trait)
Detach a trait from this VBucket.
Definition: vbucket.cc:254
std::string name_
Definition: vbucket.h:38
bool ContainsBlob(std::string blob_name, std::string bucket_name)
Definition: vbucket.cc:148
VBucketID id_
Definition: vbucket.h:40
size_t Get(const std::string &name, Bucket *bkt, Blob &user_blob, const Context &ctx)
VBucket(std::string initial_name, std::shared_ptr< Hermes > const &hermes, Context ctx=Context())
Create or open a VBucket.
Definition: vbucket.cc:26
Status Link(std::string blob_name, std::string bucket_name)
Definition: vbucket.cc:63
size_t Get(const std::string &name, Bucket *bkt, Blob &user_blob)
Status Release()
Release this vBucket.
Definition: vbucket.cc:321
std::vector< TraitID > GetTraits(Predicate pred, Context &ctx)
Retrieves the subset of attached traits satisfying the Predicate pred.
Definition: vbucket.cc:308
std::list< Trait * > attached_traits_
Definition: vbucket.h:42
Trait * GetTrait(TraitType type)
Get's an attached Trait that matches type.
Definition: vbucket.cc:295
~VBucket()
Close a VBucket.
Definition: vbucket.cc:45
Status Unlink(std::string blob_name, std::string bucket_name, Context &ctx)
Definition: vbucket.cc:109
std::string GetName() const
Return the name of this VBucket.
Definition: vbucket.cc:55
bool IsValid() const
Return bool{this VBucket is valid}.
Definition: vbucket.cc:51
std::vector< unsigned char > Blob
Definition: hermes_types.h:70
TraitType
Trait types.
Definition: hermes_types.h:428
Definition: adapter_utils.cc:35
Definition: hermes_types.h:137
Base class for Traits, which can attach functionality to VBuckets.
Definition: traits.h:52
Definition: hermes_types.h:388