![]() |
A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
|
#include <UserType.h>
Collaboration diagram for UserType:Public Member Functions | |
| UserType (NodeID nodeId, DatabaseID dbId, UserTypeID id, string name, ConfigurationPtr conf, pdb::PDBLoggerPtr logger, SharedMemPtr shm, string metaTypePath, vector< string > *dataTypePaths, PageCachePtr cache, PageCircularBufferPtr flushBuffer) | |
| ~UserType () | |
| void | flush () |
| int | addSet (string setName, SetID setId, size_t pageSize=DEFAULT_PAGE_SIZE) |
| int | removeSet (SetID setId) |
| SetPtr | getSet (SetID setId) |
| bool | initializeFromTypeDir (path typeDir) |
| bool | initializeFromMetaTypeDir (path metaTypeDir) |
| UserTypeID | getId () const |
| string | getName () const |
| void | setId (UserTypeID id) |
| void | setName (string name) |
| unsigned int | getNumSets () |
| map< SetID, SetPtr > * | getSets () |
Protected Member Functions | |
| string | encodePath (string typePath, SetID setId, string setName) |
Private Attributes | |
| string | name |
| UserTypeID | id |
| NodeID | nodeId |
| DatabaseID | dbId |
| int | numSets |
| map< SetID, SetPtr > * | sets |
| ConfigurationPtr | conf |
| pdb::PDBLoggerPtr | logger |
| SharedMemPtr | shm |
| string | metaPath |
| vector< string > * | dataPaths |
| PageCachePtr | cache |
| PageCircularBufferPtr | flushBuffer |
| pthread_mutex_t | setLock |
This class defines a UserType structure used to store all the data of the same UserTypeID. A UserType instance contains one or more Sets. Each Set has an input buffer, and associated with a PDBFile instance. When data comes in, it goes to input buffer first, then flushed to the PDBFile instance.
Definition at line 52 of file UserType.h.
| UserType::UserType | ( | NodeID | nodeId, |
| DatabaseID | dbId, | ||
| UserTypeID | id, | ||
| string | name, | ||
| ConfigurationPtr | conf, | ||
| pdb::PDBLoggerPtr | logger, | ||
| SharedMemPtr | shm, | ||
| string | metaTypePath, | ||
| vector< string > * | dataTypePaths, | ||
| PageCachePtr | cache, | ||
| PageCircularBufferPtr | flushBuffer | ||
| ) |
Create a UserType instance.
Definition at line 24 of file UserType.cc.
| UserType::~UserType | ( | ) |
Release the in-memory structure that is belonging to a UserType instance. It will not remove the persistent data on disk that is belonging to the UserType.
Definition at line 64 of file UserType.cc.
| int UserType::addSet | ( | string | setName, |
| SetID | setId, | ||
| size_t | pageSize = DEFAULT_PAGE_SIZE |
||
| ) |
|
protected |
Compute the path to store the UserType data for persistence.
Definition at line 84 of file UserType.cc.
Here is the call graph for this function:
Here is the caller graph for this function:| void UserType::flush | ( | ) |
Flush UserType data from memory to a PDBFile instance for persistence.
Definition at line 79 of file UserType.cc.
|
inline |
Definition at line 101 of file UserType.h.
|
inline |
Definition at line 106 of file UserType.h.
|
inline |
Definition at line 121 of file UserType.h.
Definition at line 150 of file UserType.cc.
Definition at line 125 of file UserType.h.
| bool UserType::initializeFromMetaTypeDir | ( | path | metaTypeDir | ) |
Definition at line 163 of file UserType.cc.
| bool UserType::initializeFromTypeDir | ( | path | typeDir | ) |
Definition at line 232 of file UserType.cc.
| int UserType::removeSet | ( | SetID | setId | ) |
Definition at line 131 of file UserType.cc.
|
inline |
|
inline |
|
private |
Definition at line 148 of file UserType.h.
|
private |
Definition at line 143 of file UserType.h.
|
private |
Definition at line 147 of file UserType.h.
|
private |
Definition at line 140 of file UserType.h.
|
private |
Definition at line 149 of file UserType.h.
|
private |
Definition at line 138 of file UserType.h.
|
private |
Definition at line 144 of file UserType.h.
|
private |
Definition at line 146 of file UserType.h.
|
private |
Definition at line 137 of file UserType.h.
|
private |
Definition at line 139 of file UserType.h.
|
private |
Definition at line 141 of file UserType.h.
|
private |
Definition at line 150 of file UserType.h.
Definition at line 142 of file UserType.h.
|
private |
Definition at line 145 of file UserType.h.