libfoedus-core
FOEDUS Core Library
|
System and User Procedures. More...
System and User Procedures.
This module manages computational tasks (Procedures here after) that can be executed on worker threads.
![]() |
Files | |
file | fwd.hpp |
Forward declarations of classes in proc package. | |
file | proc_id.hpp |
Typedefs of ID types used in procedure package. | |
Classes | |
struct | foedus::proc::ProcArguments |
Set of arguments, both inputs and outputs, given to each procedure. More... | |
class | foedus::proc::ProcManager |
Procedure manager, which maintains the list of system/user procedures. More... | |
struct | foedus::proc::ProcManagerPimpl::SharedData |
All shared data in this module. More... | |
class | foedus::proc::ProcManagerPimpl |
Pimpl object of ProcManager. More... | |
struct | foedus::proc::ProcOptions |
Set of options for loading system/user procedures. More... | |
Typedefs | |
typedef assorted::FixedString< 60 > | foedus::proc::ProcName |
Represents a unique name of a procedure. More... | |
typedef uint32_t | foedus::proc::LocalProcId |
Represents a locally-unique ID of a procedure in one SOC. More... | |
typedef uint64_t | foedus::proc::GlobalProcId |
A globally unique ID of a procedure. More... | |
typedef ErrorStack(* | foedus::proc::Proc) (const ProcArguments &args) |
A function pointer of a user/system stored procedure. More... | |
typedef std::pair< ProcName, Proc > | foedus::proc::ProcAndName |
Just a std::pair<ProcName, Proc>. More... | |
struct foedus::proc::ProcArguments |
Set of arguments, both inputs and outputs, given to each procedure.
Definition at line 81 of file proc_id.hpp.
Class Members | ||
---|---|---|
Thread * | context_ | [IN] Thread on which the procedure is running |
Engine * | engine_ | [IN] Database Engine |
const void * | input_buffer_ | [IN] Arbitrary user input given to the procedure |
uint32_t | input_len_ | [IN] Byte length of input_buffer_ |
void * | output_buffer_ | [OUT] Arbitrary user output buffer given to the procedure |
uint32_t | output_buffer_size_ | [IN] Byte length of output_buffer_ capacity |
uint32_t * | output_used_ | [OUT] Byte length of output_buffer_ actually written |
typedef uint64_t foedus::proc::GlobalProcId |
A globally unique ID of a procedure.
The high 32 bit is the SOC ID, low 32 bit is LocalProcId.
Definition at line 65 of file proc_id.hpp.
typedef uint32_t foedus::proc::LocalProcId |
Represents a locally-unique ID of a procedure in one SOC.
The same procedure might have different ID in another SOC. If the procedure is a system procedure, it always has the same ID in all SOCs because system procedures are registered at the beginning. User procedures have larger IDs than all system procedures. 2^32-1 means an invalid procedure.
Definition at line 56 of file proc_id.hpp.
typedef ErrorStack(* foedus::proc::Proc) (const ProcArguments &args) |
A function pointer of a user/system stored procedure.
For example, define your procedure as follows:
Definition at line 113 of file proc_id.hpp.
typedef std::pair<ProcName, Proc> foedus::proc::ProcAndName |
Just a std::pair<ProcName, Proc>.
Definition at line 119 of file proc_id.hpp.
typedef assorted::FixedString<60> foedus::proc::ProcName |
Represents a unique name of a procedure.
Upto 60 characters so far. It should be a globally unique name, but we do not bother checking it to avoid scalability issue. Usually, all SOCs have the same set of procedures, so it's globally unique, too.
Definition at line 44 of file proc_id.hpp.