Drizzled Public API Documentation

CSDaemon Class Reference

Inheritance diagram for CSDaemon:
CSThread CSSync CSRefObject CSLock CSObject CSMutex MSBackup MSCompactorThread MSConnectionHandler MSSystemThread MSTempLogThread MSTransactionThread

List of all members.

Public Member Functions

 CSDaemon (time_t wait_time, CSThreadList *list)
 CSDaemon (CSThreadList *list)
virtual void * run ()
virtual bool initializeWork ()
virtual bool doWork ()
virtual void * completeWork ()
virtual bool handleException ()
virtual void stop ()
void wakeup ()
void suspend ()
bool isSuspend ()
void resume ()
virtual void returnToPool ()
void suspended ()
void suspendedWait ()
void suspendedWait (time_t milli_sec)
void start (bool detached=false)
void * join ()
void signal (unsigned int)
void setSignalPending (unsigned int)
void interrupted ()
void throwSignal ()
void logStack (int depth, const char *msg)
void logException ()
void logMessage ()
bool isMain ()
void releaseObjects (CSReleasePtr top)
void throwException ()
void caught ()
bool isMe (CSThread *me)
virtual CSObjectgetNextLink ()
virtual CSObjectgetPrevLink ()
virtual void setNextLink (CSObject *link)
virtual void setPrevLink (CSObject *link)
virtual void retain ()
virtual void release ()
uint32_t getRefCount ()
virtual void finalize ()
virtual CSObjectgetKey ()
virtual int compareKey (CSObject *)
virtual uint32_t hashKey ()
virtual CSObjectgetHashLink ()
virtual void setHashLink (CSObject *)
virtual void wait ()
void wait (time_t mill_sec)
virtual void lock ()
virtual void unlock ()
virtual bool haveLock ()

Static Public Member Functions

static void sleep (unsigned long timeout)
static bool startUp ()
static void shutDown ()
static bool attach (CSThread *thread)
static void detach (CSThread *thread)
static CSThreadgetSelf ()
static bool setSelf (CSThread *self)
static CSThreadnewCSThread ()
static CSThreadnewThread (CSString *name, ThreadRunFunc run_func, CSThreadList *list)
static void * dispatch (void *arg)

Public Attributes

time_t myWaitTime
CSStringthreadName
CSThreadListmyThreadList
int signalPending
bool ignoreSignals
bool isRunning
bool myMustQuit
CSException myException
int callTop
CSCallStack callStack [CS_CALL_STACK_SIZE]
int jumpDepth
CSJumpBufRec jumpEnv [CS_JUMP_STACK_SIZE]
CSReleasePtr relTop
CSReleaseRec relStack [CS_RELEASE_STACK_SIZE]

Static Public Attributes

static pthread_key_t sThreadKey
static bool isUp = false

Private Member Functions

void try_Run (CSThread *self, const bool must_sleep)

Private Attributes

bool iSuspended
uint32_t iSuspendCount

Friends

class CSDaemon
class CSSync
class CSLock

Detailed Description

Definition at line 319 of file CSThread.h.


Member Function Documentation

CSThread * CSThread::getSelf ( ) [static, inherited]

Return the thread object of the current thread.

Definition at line 530 of file CSThread.cc.

void CSThread::interrupted ( ) [inline, inherited]

Check to see if we have been interrupted by a signal (i.e. there is a signal pending). This function throws CSSignalException if there is a signal pending.

Definition at line 237 of file CSThread.h.

void * CSThread::join ( ) [inherited]

Wait for this thread to die.

Exceptions:
CSSystemExceptionthrown if thread is invalid.

Definition at line 323 of file CSThread.cc.

void * CSDaemon::run ( ) [virtual]

Task to be performed by this thread.

Exceptions:
CSSystemExceptionthrown if thread cannot be run.

Reimplemented from CSThread.

Definition at line 669 of file CSThread.cc.

void CSThread::signal ( unsigned int  sig) [inherited]

Signal the thread. Throws CSSystemException if the thread is invalid.

Definition at line 349 of file CSThread.cc.

Referenced by CSThreadList::signalAllThreads().

void CSThread::sleep ( unsigned long  timeout) [static, inherited]

Put the currently executing thread to sleep for a given amount of time.

Parameters:
timeoutmaximum amount of time (milliseconds) this method could block
Exceptions:
TDInterruptedExceptionthrown if the threads sleep is interrupted before timeout milliseconds expire.

Definition at line 571 of file CSThread.cc.

void CSThread::start ( bool  detached = false) [inherited]

Start execution of the thread.

Exceptions:
CSSystemExceptionthrown if thread is invalid.

Definition at line 296 of file CSThread.cc.


The documentation for this class was generated from the following files: