Represents a "phantom" range. More...
#include <PhantomRange.h>
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 RangeState & | get_range_state () |
void | purge_incomplete_fragments () |
void | create_range (Lib::Master::ClientPtr &master_client, TableInfoPtr &table_info, FilesystemPtr &log_dfs) |
RangePtr & | get_range () |
void | populate_range_and_log (FilesystemPtr &log_dfs, int64_t recovery_id, bool *is_empty) |
CommitLogReaderPtr | get_phantom_log () |
const String & | get_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 |
Represents a "phantom" range.
Definition at line 53 of file PhantomRange.h.
|
private |
Definition at line 105 of file PhantomRange.h.
PhantomRange::PhantomRange | ( | const QualifiedRangeSpec & | spec, |
const RangeState & | state, | ||
SchemaPtr & | schema, | ||
const vector< int32_t > & | fragments | ||
) |
Definition at line 41 of file PhantomRange.cc.
|
inline |
Definition at line 66 of file PhantomRange.h.
bool PhantomRange::add | ( | int32_t | fragment, |
EventPtr & | event | ||
) |
fragment | fragment id |
event | contains data fort his fragment |
Definition at line 58 of file PhantomRange.cc.
bool PhantomRange::committed | ( | ) |
Definition at line 175 of file PhantomRange.cc.
|
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.
|
inline |
Definition at line 80 of file PhantomRange.h.
|
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.
|
private |
Definition at line 108 of file PhantomRange.h.
|
private |
Definition at line 107 of file PhantomRange.h.
|
private |
Definition at line 112 of file PhantomRange.h.
|
private |
Definition at line 114 of file PhantomRange.h.
|
private |
Definition at line 115 of file PhantomRange.h.
|
private |
Definition at line 113 of file PhantomRange.h.
|
private |
Definition at line 109 of file PhantomRange.h.
|
private |
Definition at line 110 of file PhantomRange.h.
|
private |
Definition at line 111 of file PhantomRange.h.
|
private |
Definition at line 116 of file PhantomRange.h.