#include <dc_instance.h>
Public Methods | |
DC_FilterInstance_t (void) | |
~DC_FilterInstance_t (void) | |
DC_WorkHandle_t | AppendWork (DC_Work_t &work, bool fWait=true) |
appends the given work to a running instance, returns handle. More... | |
Public Attributes | |
DC_Filter_Base_t::arg_t | arg |
fDetached == F -> used by console process to recv results. | |
Protected Types | |
enum | { INIT, WAIT, WORK, STOP, DONE } |
Protected Methods | |
Types::uint | find_filter (const char *sbName) |
DC_ConsoleStreamSpec* | find_stream (const char *sbName, Types::uint &iStream) |
bool | _isDetached (void) |
void | _Delete (void) |
int | _Reset (DC_FilterService_t *pDC_in, DC_ConsoleProcessState *pConsole_in) |
int | _ProcessLayout (DC_FilterLayout_t &layout) |
int | _ProcessPlacement (DC_Placement_t &placement) |
int | _StartInstance (void) |
int | _StopInstance (void) |
int | _WaitUntilInstanceDone (void) |
int | _InstanceExit_Reader (void) |
Protected Attributes | |
DC_FilterService_t* | pDC |
DC_ConsoleProcessState* | pConsole |
int | wInstanceNum |
char* | sbLayoutName |
bool | fDetached |
enum DC_FilterInstance_t:: { ... } | eState |
int | wNextWorkNum |
int | wRemoteInstances |
total remote processes used for this instance. | |
int | cRemoteInstanceExit |
count of remote processes that finished. | |
DArray<DC_ConsoleFilterSpec*> | daFilterSpec |
DArray<DC_ConsoleStreamSpec*> | daStreamSpec |
DC_Mutex | mutex |
Multiple instances all exist within a single remote process. That remote process is assumed to exist before this class can do anything.
|
INIT - after ctor called WAIT - filters instantiated on remote libs, no work to do WORK - processing work STOP - currently being stopped DONE - instance is finished |
|
ctor |
|
dtor |
|
appends the given work to a running instance, returns handle. Append the given work buffer to this running instance. Inputs: work - uow to add to the new instance fWait - T=indicates if user will eventually call DC.WaitWork() F=automatic reap of work state when finished Return: int - 0+=work handle, <0=failure |
|
parse and validate the configinfo based layout, and fill out the specs in our instance. case "thru": Indicated by a single filter with the name <console>. Can only have ins (we may remove this restiction in the future if needed). This filter is virtual, and no thread is created, as done for a normal remote process filter. The thread of the console process main is used instead. All the remote process structures are created but the ins[] struct necessarily needs to be different, because instances are dynamically created and stopped. The console's filterinstance obj is where the ins will be parked. |
|
parse and validate the placement information, check which remote processes are not in daPlacementSpec and add them. |
|
generate and send the start instance command for each remote process |
|
Sends stop messages to all remote processes for this instance. The reader will later recv the INSTANCEEXIT packets and adjust the instance state accordingly. Return: int - number of INSTANCEEXIT packets to expect for this instance |
|
look for a stream by name, and if not found, create a new one |
|
INIT - after ctor called WAIT - filters instantiated on remote libs, no work to do WORK - processing work STOP - currently being stopped DONE - instance is finished |
|
false if [filter.<console>] is detected in filterlayout, which causes a pseudo-filter to be created for when results are funnelled back through the main console thread. |