Skip to content

Instantly share code, notes, and snippets.

@markpapadakis
Created May 9, 2014 20:34
Show Gist options
  • Select an option

  • Save markpapadakis/bb7f7f76f2b240182c28 to your computer and use it in GitHub Desktop.

Select an option

Save markpapadakis/bb7f7f76f2b240182c28 to your computer and use it in GitHub Desktop.
struct IColumn
: public RefCounted<IColumn>, public IExpirable
{
column_name name;
};
struct IColumnsContainer
: public IColumn
{
Vector<IColumn *, ReleaseRefDestructor> columns;
};
struct Column
: public IColumn
{
column_value value;
timestamp_t timestamp;
uint8_t flags;
};
struct SuperColumn
: public IColumnsContainer
{
timestamp_t markedForDeletionTs;
time32_t localDeletionTs;
uint32_t size; // memory footprint aggregate size for all columns
};
struct ColumnFamily
: public IColumnsContainer
{
friend class ColumnFamilyStore;
timestamp_t markedForDeletionTs;
time32_t localDeletionTs;
uint32_t size;
/*
* Private to CloudDS service environment. Do not use in ClouDS client applications
*
*/
struct
{
uint8_t flags;
inline bool IsTransient(void) const
{
// Transient CFs are temporary;
// we can safely modify their structure etc without having to first clone them
// and subsequently operate on the clone
// Essentially, CFS not stored in Memtables are transients
return (flags&CF_PRIV_FLAGS_IMMUTABLE_STRUCTURE) == 0;
}
} _priv;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment