IRISLIB database
WorkMgr Class Reference

Utility class that provides an API for managing DeepSee tasks. More...

Inheritance diagram for WorkMgr:
Collaboration diagram for WorkMgr:

Static Public Attributes

 EVENTNAME = None
 Utility class that provides an API for managing DeepSee tasks. More...
 
 TIMEOUT = None
 Timeout value (seconds) for events. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Static Private Member Functions

_.Library.Integer AgentsAvailable (pPriority, pStatus)
 
_.SYSTEM.WorkMgr AttachToQueue (_.Library.String pQueueName, _.Library.Status pStatus)
 Look up a token to reattach to a given WorkMgr queue. More...
 
_.Library.Status CloseTask (_.Library.String pTaskGroup, _.Library.List pParameters)
 This is called as the callback to ExecuteTask which cleans up the management global. More...
 
_.Library.Status CreateAgents (_.Library.Integer pNumAgents)
 
_.Library.Status CreateTaskGroup (_.Library.String pTaskGroup, _.Library.Boolean pWait, _.Library.String pName, pRequestWorkMgr, pWorkMgr)
 Create a unique idenitfier for a task group. More...
 
_.Library.Status DequeueTask (_.Library.String pTaskGroup, _.Library.List pParameters, _.Library.Boolean pSuppressArchive)
 This is called in ExecuteTask to mark the task "active" in the process logging.
 
_.Library.Status DestroyTaskGroup (_.Library.String pTaskGroup, _.Library.Boolean pPurgeTasks)
 Close down all work being done by this task group.
 
_.Library.Status DetachFromQueue (_.Library.String pQueueName, _.SYSTEM.WorkMgr pWorkMgr)
 Detach from a given WorkMgr queue and store the current token needed to reattach. More...
 
_.Library.Status ExecuteTask (_.Library.String pTaskGroup, _.Library.List pParameters, _.Library.String pSettings)
 This is run by the worker and will do the actual work of processing tasks via the work queue manager.
 
_.SYSTEM.WorkMgr InitializeWorkMgr (pQueueName, pStatus)
 Create a new SYSTEM.WorkMgr instance for use managing this DeepSee task queue.
 
_.Library.Boolean IsActive ()
 WorkQ agents will be made available as needed. More...
 
_.Library.Status KillAgents (_.Library.Boolean pPurgeTasks)
 Find all open WorkQ manager instances and shut them down.
 
_.Library.Status KillLog (_.Library.String pMsg)
 Kill the agent log.
 
_.Library.Status KillTasksForGroup (_.Library.String pTaskGroup)
 This performs the actual cleanup work to remove all tasks assigned to a particular logical work group.
 
 Log (_.Library.String pMsg)
 Log a message to the agent log.
 
 PrintActiveTasks ()
 Print list of active tasks out to the console.
 
 PrintLog ()
 Print contents of the (global-based) agent log to the console.
 
 PrintPendingTasks ()
 Print list of pending (queued) tasks out to the console.
 
 PrintTaskGroups ()
 Print current task groups to the console.
 
_.Library.Status QueueTask (_.Library.String pTaskGroup, _.Library.String pTaskType, _.Library.String pCubeName, _.Library.String pQueryKey, _.Library.String pData, _.Library.String pData2, _.Library.String pData3, _.Library.String pSQLParams, _.Library.Boolean pSuppressArchive, _.SYSTEM.WorkMgr pWorkMgr)
 This is called from the foreground to. More...
 
_.Library.Status Reset ()
 Reset the WorkMgr. More...
 
 SetLoggingOptions (pUseArchive, pLogSize, pLogAll)
 Turn on logging for the DeepSee background agents. More...
 
_.Library.Status Test (pTaskCount, pTimeOut, pClean)
 Perform simple test of DeepSee WorkMgr. More...
 
_.Library.Status WaitForTaskGroup (_.Library.String pTaskGroup, _.Library.Boolean pCompleted, _.Library.Integer pTimeOut, _.SYSTEM.WorkMgr pWorkMgr, _.Library.Integer pMaxTaskGroupWorkers, _.Library.Integer pMaxWorkersOverallSoFar)
 Wrapper for the WorkMgr:Sync() that parallels the original DeepSee.TaskMaster version. More...
 

Additional Inherited Members

- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Detailed Description

Utility class that provides an API for managing DeepSee tasks.


This is an internal utility used by DeepSee.

Member Function Documentation

◆ AgentsAvailable()

_.Library.Integer AgentsAvailable (   pPriority,
  pStatus 
)
staticprivate
  • NOT IMPLEMENTED -

    Agents are always available and created as needed. There is no need to test anymore.

◆ AttachToQueue()

_.SYSTEM.WorkMgr AttachToQueue ( _.Library.String  pQueueName,
_.Library.Status  pStatus 
)
staticprivate

Look up a token to reattach to a given WorkMgr queue.

After successfully serializing a WorkMgr instance, through either attachment to a pre-existing queue or initialization of a new queue, the storage location for the provided pQueueName is marked with the null string to provide an indication the queue is currently open and working.

◆ CloseTask()

_.Library.Status CloseTask ( _.Library.String  pTaskGroup,
_.Library.List  pParameters 
)
staticprivate

This is called as the callback to ExecuteTask which cleans up the management global.

This

method will also close out the WorkQ if the group was created with pWait = 0.

◆ CreateAgents()

_.Library.Status CreateAgents ( _.Library.Integer  pNumAgents)
staticprivate
  • NOT IMPLEMENTED -

    This is handled by the WorkQMgr as part of task queueing operations

◆ CreateTaskGroup()

_.Library.Status CreateTaskGroup ( _.Library.String  pTaskGroup,
_.Library.Boolean  pWait,
_.Library.String  pName,
  pRequestWorkMgr,
  pWorkMgr 
)
staticprivate

Create a unique idenitfier for a task group.

The caller may optionally request an object reference with pRequestWorkMgr=1 which will be returned via pWorkMgr for customized use.

◆ DetachFromQueue()

_.Library.Status DetachFromQueue ( _.Library.String  pQueueName,
_.SYSTEM.WorkMgr  pWorkMgr 
)
staticprivate

Detach from a given WorkMgr queue and store the current token needed to reattach.

If the storage location has been deleted before detaching from the queue (eg: by a cancellation operation), then the token is discarded.

◆ IsActive()

_.Library.Boolean IsActive ( )
staticprivate

WorkQ agents will be made available as needed.

This test always returns True

◆ QueueTask()

_.Library.Status QueueTask ( _.Library.String  pTaskGroup,
_.Library.String  pTaskType,
_.Library.String  pCubeName,
_.Library.String  pQueryKey,
_.Library.String  pData,
_.Library.String  pData2,
_.Library.String  pData3,
_.Library.String  pSQLParams,
_.Library.Boolean  pSuppressArchive,
_.SYSTEM.WorkMgr  pWorkMgr 
)
staticprivate

This is called from the foreground to.

add a task to the queue of background tasks.
pTaskGroup must be defined in order to properly assign individual tasks to a particular work queue. The caller may optionally supply an object reference to a pWorkMgr to add the task to that custom work queue.

◆ Reset()

_.Library.Status Reset ( )
staticprivate

Reset the WorkMgr.


This stops all running agents, clears out all tasks, and clears the logs.

◆ SetLoggingOptions()

SetLoggingOptions (   pUseArchive,
  pLogSize,
  pLogAll 
)
staticprivate

Turn on logging for the DeepSee background agents.

These will be reset during a call to <method>KillLog</method>.

◆ Test()

_.Library.Status Test (   pTaskCount,
  pTimeOut,
  pClean 
)
staticprivate

Perform simple test of DeepSee WorkMgr.

This will kill any pending task.

◆ WaitForTaskGroup()

_.Library.Status WaitForTaskGroup ( _.Library.String  pTaskGroup,
_.Library.Boolean  pCompleted,
_.Library.Integer  pTimeOut,
_.SYSTEM.WorkMgr  pWorkMgr,
_.Library.Integer  pMaxTaskGroupWorkers,
_.Library.Integer  pMaxWorkersOverallSoFar 
)
staticprivate

Wrapper for the WorkMgr:Sync() that parallels the original DeepSee.TaskMaster version.

The caller may optionally supply an object reference to a pWorkMgr for custom use.

Member Data Documentation

◆ EVENTNAME

EVENTNAME = None
static

Utility class that provides an API for managing DeepSee tasks.


This is an internal utility used by DeepSee.

Name of system used to talk to agents.

◆ TIMEOUT

TIMEOUT = None
static

Timeout value (seconds) for events.

If no events are received, then the agent will shut itself down.