0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Hypertable::PhantomRange Class Reference

Represents a "phantom" range. More...

#include <PhantomRange.h>

Collaboration diagram for Hypertable::PhantomRange:
Collaboration graph
[legend]

Public Types

enum  State {
  LOADED = 0x00000001, REPLAYED = 0x00000002, PREPARED = 0x00000004, COMMITTED = 0x00000008,
  CANCELLED = 0x00000010
}
 

Public Member Functions

 PhantomRange (const QualifiedRangeSpec &spec, const RangeState &state, SchemaPtr &schema, const vector< int32_t > &fragments)
 
 ~PhantomRange ()
 
bool add (int32_t fragment, EventPtr &event)
 
int get_state ()
 
const RangeStateget_range_state ()
 
void purge_incomplete_fragments ()
 
void create_range (Lib::Master::ClientPtr &master_client, TableInfoPtr &table_info, FilesystemPtr &log_dfs)
 
RangePtrget_range ()
 
void populate_range_and_log (FilesystemPtr &log_dfs, int64_t recovery_id, bool *is_empty)
 
CommitLogReaderPtr get_phantom_log ()
 
const Stringget_phantom_logname ()
 
void set_replayed ()
 
bool replayed ()
 
void set_prepared ()
 
bool prepared ()
 
void set_committed ()
 
bool committed ()
 

Private Types

typedef std::map< int32_t,
FragmentDataPtr
FragmentMap
 

Private Member Functions

String create_log (FilesystemPtr &log_dfs, int64_t recovery_id, MetaLogEntityRangePtr &range_entity)
 

Private Attributes

std::mutex m_mutex
 
FragmentMap m_fragments
 
QualifiedRangeSpec m_range_spec
 
RangeState m_range_state
 
SchemaPtr m_schema
 
size_t m_outstanding
 
RangePtr m_range
 
CommitLogReaderPtr m_phantom_log
 
String m_phantom_logname
 
int m_state
 

Detailed Description

Represents a "phantom" range.

Definition at line 53 of file PhantomRange.h.

Member Typedef Documentation

typedef std::map<int32_t, FragmentDataPtr> Hypertable::PhantomRange::FragmentMap
private

Definition at line 105 of file PhantomRange.h.

Constructor & Destructor Documentation

PhantomRange::PhantomRange ( const QualifiedRangeSpec spec,
const RangeState state,
SchemaPtr schema,
const vector< int32_t > &  fragments 
)

Definition at line 41 of file PhantomRange.cc.

Hypertable::PhantomRange::~PhantomRange ( )
inline

Definition at line 66 of file PhantomRange.h.

Member Function Documentation

bool PhantomRange::add ( int32_t  fragment,
EventPtr event 
)
Parameters
fragmentfragment id
eventcontains data fort his fragment
Returns
true if the add succeded, false means the fragment is already complete

Definition at line 58 of file PhantomRange.cc.

bool PhantomRange::committed ( )

Definition at line 175 of file PhantomRange.cc.

String PhantomRange::create_log ( FilesystemPtr log_dfs,
int64_t  recovery_id,
MetaLogEntityRangePtr range_entity 
)
private

Definition at line 180 of file PhantomRange.cc.

void PhantomRange::create_range ( Lib::Master::ClientPtr master_client,
TableInfoPtr table_info,
FilesystemPtr log_dfs 
)

Definition at line 77 of file PhantomRange.cc.

CommitLogReaderPtr PhantomRange::get_phantom_log ( )

Definition at line 141 of file PhantomRange.cc.

const String & PhantomRange::get_phantom_logname ( )

Definition at line 136 of file PhantomRange.cc.

RangePtr& Hypertable::PhantomRange::get_range ( )
inline

Definition at line 80 of file PhantomRange.h.

const RangeState& Hypertable::PhantomRange::get_range_state ( )
inline

Definition at line 75 of file PhantomRange.h.

int PhantomRange::get_state ( )

Definition at line 53 of file PhantomRange.cc.

void PhantomRange::populate_range_and_log ( FilesystemPtr log_dfs,
int64_t  recovery_id,
bool *  is_empty 
)

Definition at line 89 of file PhantomRange.cc.

bool PhantomRange::prepared ( )

Definition at line 164 of file PhantomRange.cc.

void PhantomRange::purge_incomplete_fragments ( )

Definition at line 70 of file PhantomRange.cc.

bool PhantomRange::replayed ( )

Definition at line 153 of file PhantomRange.cc.

void PhantomRange::set_committed ( )

Definition at line 169 of file PhantomRange.cc.

void PhantomRange::set_prepared ( )

Definition at line 158 of file PhantomRange.cc.

void PhantomRange::set_replayed ( )

Definition at line 147 of file PhantomRange.cc.

Member Data Documentation

FragmentMap Hypertable::PhantomRange::m_fragments
private

Definition at line 108 of file PhantomRange.h.

std::mutex Hypertable::PhantomRange::m_mutex
private

Definition at line 107 of file PhantomRange.h.

size_t Hypertable::PhantomRange::m_outstanding
private

Definition at line 112 of file PhantomRange.h.

CommitLogReaderPtr Hypertable::PhantomRange::m_phantom_log
private

Definition at line 114 of file PhantomRange.h.

String Hypertable::PhantomRange::m_phantom_logname
private

Definition at line 115 of file PhantomRange.h.

RangePtr Hypertable::PhantomRange::m_range
private

Definition at line 113 of file PhantomRange.h.

QualifiedRangeSpec Hypertable::PhantomRange::m_range_spec
private

Definition at line 109 of file PhantomRange.h.

RangeState Hypertable::PhantomRange::m_range_state
private

Definition at line 110 of file PhantomRange.h.

SchemaPtr Hypertable::PhantomRange::m_schema
private

Definition at line 111 of file PhantomRange.h.

int Hypertable::PhantomRange::m_state
private

Definition at line 116 of file PhantomRange.h.


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