Classes | Public Member Functions

graphlab::graph_lock< GraphType > Class Template Reference

#include <graph_lock.hpp>

List of all members.


struct  partiallock_cont_params
struct  scopelock_cont_params

Public Member Functions

 graph_lock (distributed_control &dc, GraphType &dgraph, bool synchronize_data=false)
void scope_request (vertex_id_t globalvid, boost::function< void(vertex_id_t)> handler, scope_range::scope_range_enum scopetype)
void scope_unlock (vertex_id_t globalvid, scope_range::scope_range_enum scopetype)
template<typename GraphType >
__attribute__ ((aligned(8)))

Detailed Description

template<typename GraphType>
class graphlab::graph_lock< GraphType >

The locking implementation is basically two families of continuations. The first family is called the scopelock_continuation This family completes the lock of a scope. It iterates over the owners of the replicas of the vertex, and issue remote calls to acquire locks on them.

The second family is called partiallock_continuation It completes the lock on local vertices. It iterates over the owned vertices within the scope of the vertex, acquiring locks.

This class is templatized over graph type, but really it requires relatively deep introspection into the graph and will only work with the distributed_graph implementation right now. This could be generalized.

Definition at line 56 of file graph_lock.hpp.

Member Function Documentation

template<typename GraphType>
template<typename GraphType >
struct graphlab::graph_lock::partiallock_cont_params graphlab::graph_lock< GraphType >::__attribute__ ( (aligned(8))   ) 

The parameters passed on to the partial lock continuation

template<typename GraphType>
void graphlab::graph_lock< GraphType >::scope_request ( vertex_id_t  globalvid,
boost::function< void(vertex_id_t)>  handler,
scope_range::scope_range_enum  scopetype 
) [inline]

Requests a lock on the scope surrounding globalvid. This globalvid must be owned by the current machine. When lock is complete the handler is called.

Definition at line 69 of file graph_lock.hpp.

template<typename GraphType>
void graphlab::graph_lock< GraphType >::scope_unlock ( vertex_id_t  globalvid,
scope_range::scope_range_enum  scopetype 
) [inline]

Isues an unlock on the scope surrounding globalvid. A lock on this scope MUST have been acquired before or very bad things will happen

Definition at line 101 of file graph_lock.hpp.

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