Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
hermes::api::Trait Struct Reference

Base class for Traits, which can attach functionality to VBuckets. More...

#include <traits.h>

Inheritance diagram for hermes::api::Trait:

Public Member Functions

 Trait ()
 Default constructor.
 
 Trait (TraitID id, const std::vector< TraitID > &conflict_traits, TraitType type)
 Construct a Trait. More...
 

Public Attributes

TraitID id
 
std::vector< TraitIDconflict_traits
 
TraitType type
 
OnAttachCallback onAttachFn
 
OnAttachCallback onDetachFn
 
OnLinkCallback onLinkFn
 
OnLinkCallback onUnlinkFn
 
OnLinkCallback onGetFn
 

Detailed Description

Base class for Traits, which can attach functionality to VBuckets.

To add functionality to a VBucket, inherit from this class and implement the various callbacks.

Constructor & Destructor Documentation

◆ Trait()

hermes::api::Trait::Trait ( TraitID  id,
const std::vector< TraitID > &  conflict_traits,
TraitType  type 
)

Construct a Trait.

Parameters
idA unique identifier.
conflict_traitsThe IDs of the Traits that conflict with this Trait.
typeThe type of Trait.

Member Data Documentation

◆ id

TraitID hermes::api::Trait::id

The trait's ID

◆ conflict_traits

std::vector<TraitID> hermes::api::Trait::conflict_traits

IDs of Traits whose functionality conflict with this Trait.

◆ type

TraitType hermes::api::Trait::type

The trait's type.

◆ onAttachFn

OnAttachCallback hermes::api::Trait::onAttachFn

Callback for trait->vbucket attach events.

◆ onDetachFn

OnAttachCallback hermes::api::Trait::onDetachFn

Callback for trait->vbucket detach events.

◆ onLinkFn

OnLinkCallback hermes::api::Trait::onLinkFn

Callback for blob->vbucket link events.

◆ onUnlinkFn

OnLinkCallback hermes::api::Trait::onUnlinkFn

Callback for blob-<vbucket unlink events.

◆ onGetFn

OnLinkCallback hermes::api::Trait::onGetFn

Callback for VBucket::Get events.


The documentation for this struct was generated from the following files: