|
MDList
|
#include <mdlist.h>
Public Member Functions | |
| Node (ULL, int, ULL, T val=NULL) | |
| Node Class Constructor. More... | |
| void | lock () |
| Locks the node mutex. More... | |
| bool | try_lock () |
| Non blocking lock operation on node mutex. More... | |
| void | unlock () |
| Unlocks the node mutex. More... | |
| ULL | getKey () |
| Getter for key. More... | |
| void | setValue (T) |
| Setter for value. More... | |
| T | getValue () |
| Getter for Value. More... | |
| void | setChild (int, Node *) |
| Setter for child Node. More... | |
| Node< T > * | getChild (int) |
| Getter for Child. More... | |
| vector< int > | getCoordinates () |
| Getter for Node coordinates. More... | |
Private Attributes | |
| ULL | key |
| The key. More... | |
| T | val |
| The value. More... | |
| vector< int > | COORDINATES |
| The Node coordinates. More... | |
| vector< Node * > | child |
| The vector of children of this Node. More... | |
| std::mutex | mutex |
| Mutex lock for this Node. More... | |
| std::mutex | child_mutex |
| Mutex lock for children. More... | |
| std::mutex | val_mutex |
| Mutex lock for value. More... | |
Node class.
Each node has a key and coordinates in key space and it stores a value. It also has a mutex for thread safety in multi-threaded environment.
Getter for Child.
| index | The index of child. |
| vector< int > Node< T >::getCoordinates | ( | ) |
| T Node< T >::getValue | ( | ) |
Getter for Value.
| void Node< T >::lock | ( | ) |
Locks the node mutex.
| void Node< T >::setValue | ( | T | val | ) |
Setter for value.
| val | The value. |
| bool Node< T >::try_lock | ( | ) |
Non blocking lock operation on node mutex.
| void Node< T >::unlock | ( | ) |
Unlocks the node mutex.
|
private |
Mutex lock for children.
|
private |
|
private |
The value.
|
private |
Mutex lock for value.
1.8.14