Flex  0.17.9
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
gs::UpdateTransaction Class Reference

#include <update_transaction.h>

Collaboration diagram for gs::UpdateTransaction:
Collaboration graph
[legend]

Classes

class  edge_iterator
 
class  vertex_iterator
 

Public Member Functions

 UpdateTransaction (MutablePropertyFragment &graph, Allocator &alloc, const std::string &work_dir, WalWriter &logger, VersionManager &vm, timestamp_t timestamp)
 
 ~UpdateTransaction ()
 
timestamp_t timestamp () const
 
void Commit ()
 
void Abort ()
 
bool AddVertex (label_t label, const Any &oid, const std::vector< Any > &props)
 
bool AddEdge (label_t src_label, const Any &src, label_t dst_label, const Any &dst, label_t edge_label, const Any &value)
 
vertex_iterator GetVertexIterator (label_t label)
 
edge_iterator GetOutEdgeIterator (label_t label, vid_t u, label_t neighbor_label, label_t edge_label)
 
edge_iterator GetInEdgeIterator (label_t label, vid_t u, label_t neighbor_label, label_t edge_label)
 
Any GetVertexField (label_t label, vid_t lid, int col_id) const
 
bool SetVertexField (label_t label, vid_t lid, int col_id, const Any &value)
 
void SetEdgeData (bool dir, label_t label, vid_t v, label_t neighbor_label, vid_t nbr, label_t edge_label, const Any &value)
 
bool GetUpdatedEdgeData (bool dir, label_t label, vid_t v, label_t neighbor_label, vid_t nbr, label_t edge_label, Any &ret) const
 

Static Public Member Functions

static void IngestWal (MutablePropertyFragment &graph, const std::string &work_dir, uint32_t timestamp, char *data, size_t length, Allocator &alloc)
 

Private Member Functions

void batch_commit (UpdateBatch &batch)
 
void set_edge_data_with_offset (bool dir, label_t label, vid_t v, label_t neighbor_label, vid_t nbr, label_t edge_label, const Any &value, size_t offset)
 
size_t get_in_csr_index (label_t src_label, label_t dst_label, label_t edge_label) const
 
size_t get_out_csr_index (label_t src_label, label_t dst_label, label_t edge_label) const
 
bool oid_to_lid (label_t label, const Any &oid, vid_t &lid) const
 
Any lid_to_oid (label_t label, vid_t lid) const
 
void release ()
 
void applyVerticesUpdates ()
 
void applyEdgesUpdates ()
 

Private Attributes

MutablePropertyFragmentgraph_
 
Allocatoralloc_
 
WalWriterlogger_
 
VersionManagervm_
 
timestamp_t timestamp_
 
grape::InArchive arc_
 
int op_num_
 
size_t vertex_label_num_
 
size_t edge_label_num_
 
std::vector< std::shared_ptr< IdIndexerBase< vid_t > > > added_vertices_
 
std::vector< vid_tadded_vertices_base_
 
std::vector< vid_tvertex_nums_
 
std::vector< ska::flat_hash_map< vid_t, vid_t > > vertex_offsets_
 
std::vector< Tableextra_vertex_properties_
 
std::vector< ska::flat_hash_map< vid_t, std::vector< vid_t > > > added_edges_
 
std::vector< ska::flat_hash_map< vid_t, ska::flat_hash_map< vid_t, std::pair< Any, size_t > > > > updated_edge_data_
 
std::vector< std::string > sv_vec_
 

Friends

class GraphDBSession
 

Constructor & Destructor Documentation

◆ UpdateTransaction()

gs::UpdateTransaction::UpdateTransaction ( MutablePropertyFragment graph,
Allocator alloc,
const std::string &  work_dir,
WalWriter logger,
VersionManager vm,
timestamp_t  timestamp 
)

◆ ~UpdateTransaction()

gs::UpdateTransaction::~UpdateTransaction ( )

Member Function Documentation

◆ Abort()

void gs::UpdateTransaction::Abort ( )

◆ AddEdge()

bool gs::UpdateTransaction::AddEdge ( label_t  src_label,
const Any src,
label_t  dst_label,
const Any dst,
label_t  edge_label,
const Any value 
)

◆ AddVertex()

bool gs::UpdateTransaction::AddVertex ( label_t  label,
const Any oid,
const std::vector< Any > &  props 
)

◆ applyEdgesUpdates()

void gs::UpdateTransaction::applyEdgesUpdates ( )
private

◆ applyVerticesUpdates()

void gs::UpdateTransaction::applyVerticesUpdates ( )
private

◆ batch_commit()

void gs::UpdateTransaction::batch_commit ( UpdateBatch batch)
private

◆ Commit()

void gs::UpdateTransaction::Commit ( )

◆ get_in_csr_index()

size_t gs::UpdateTransaction::get_in_csr_index ( label_t  src_label,
label_t  dst_label,
label_t  edge_label 
) const
private

◆ get_out_csr_index()

size_t gs::UpdateTransaction::get_out_csr_index ( label_t  src_label,
label_t  dst_label,
label_t  edge_label 
) const
private

◆ GetInEdgeIterator()

UpdateTransaction::edge_iterator gs::UpdateTransaction::GetInEdgeIterator ( label_t  label,
vid_t  u,
label_t  neighbor_label,
label_t  edge_label 
)

◆ GetOutEdgeIterator()

UpdateTransaction::edge_iterator gs::UpdateTransaction::GetOutEdgeIterator ( label_t  label,
vid_t  u,
label_t  neighbor_label,
label_t  edge_label 
)

◆ GetUpdatedEdgeData()

bool gs::UpdateTransaction::GetUpdatedEdgeData ( bool  dir,
label_t  label,
vid_t  v,
label_t  neighbor_label,
vid_t  nbr,
label_t  edge_label,
Any ret 
) const

◆ GetVertexField()

Any gs::UpdateTransaction::GetVertexField ( label_t  label,
vid_t  lid,
int  col_id 
) const

◆ GetVertexIterator()

UpdateTransaction::vertex_iterator gs::UpdateTransaction::GetVertexIterator ( label_t  label)

◆ IngestWal()

void gs::UpdateTransaction::IngestWal ( MutablePropertyFragment graph,
const std::string &  work_dir,
uint32_t  timestamp,
char *  data,
size_t  length,
Allocator alloc 
)
static

◆ lid_to_oid()

Any gs::UpdateTransaction::lid_to_oid ( label_t  label,
vid_t  lid 
) const
private

◆ oid_to_lid()

bool gs::UpdateTransaction::oid_to_lid ( label_t  label,
const Any oid,
vid_t lid 
) const
private

◆ release()

void gs::UpdateTransaction::release ( )
private

◆ set_edge_data_with_offset()

void gs::UpdateTransaction::set_edge_data_with_offset ( bool  dir,
label_t  label,
vid_t  v,
label_t  neighbor_label,
vid_t  nbr,
label_t  edge_label,
const Any value,
size_t  offset 
)
private

◆ SetEdgeData()

void gs::UpdateTransaction::SetEdgeData ( bool  dir,
label_t  label,
vid_t  v,
label_t  neighbor_label,
vid_t  nbr,
label_t  edge_label,
const Any value 
)

◆ SetVertexField()

bool gs::UpdateTransaction::SetVertexField ( label_t  label,
vid_t  lid,
int  col_id,
const Any value 
)

◆ timestamp()

timestamp_t gs::UpdateTransaction::timestamp ( ) const

Friends And Related Function Documentation

◆ GraphDBSession

friend class GraphDBSession
friend

Member Data Documentation

◆ added_edges_

std::vector<ska::flat_hash_map<vid_t, std::vector<vid_t> > > gs::UpdateTransaction::added_edges_
private

◆ added_vertices_

std::vector<std::shared_ptr<IdIndexerBase<vid_t> > > gs::UpdateTransaction::added_vertices_
private

◆ added_vertices_base_

std::vector<vid_t> gs::UpdateTransaction::added_vertices_base_
private

◆ alloc_

Allocator& gs::UpdateTransaction::alloc_
private

◆ arc_

grape::InArchive gs::UpdateTransaction::arc_
private

◆ edge_label_num_

size_t gs::UpdateTransaction::edge_label_num_
private

◆ extra_vertex_properties_

std::vector<Table> gs::UpdateTransaction::extra_vertex_properties_
private

◆ graph_

MutablePropertyFragment& gs::UpdateTransaction::graph_
private

◆ logger_

WalWriter& gs::UpdateTransaction::logger_
private

◆ op_num_

int gs::UpdateTransaction::op_num_
private

◆ sv_vec_

std::vector<std::string> gs::UpdateTransaction::sv_vec_
private

◆ timestamp_

timestamp_t gs::UpdateTransaction::timestamp_
private

◆ updated_edge_data_

std::vector<ska::flat_hash_map< vid_t, ska::flat_hash_map<vid_t, std::pair<Any, size_t> > > > gs::UpdateTransaction::updated_edge_data_
private

◆ vertex_label_num_

size_t gs::UpdateTransaction::vertex_label_num_
private

◆ vertex_nums_

std::vector<vid_t> gs::UpdateTransaction::vertex_nums_
private

◆ vertex_offsets_

std::vector<ska::flat_hash_map<vid_t, vid_t> > gs::UpdateTransaction::vertex_offsets_
private

◆ vm_

VersionManager& gs::UpdateTransaction::vm_
private

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