The C++ framework for developing highly scalable, high performance servers on Windows platforms.

IRingBufferWorkPoolWorkerThreadCallback Class Reference

List of all members.

Public Member Functions

virtual bool UseExtractionBuffer () const
 Called once, before the thread is first started. Return true to have the data to process extracted from the work item before calling into the worker thread and false to extract the data yourself.
virtual bool Initialise ()=0
 Called once when the thread is first started. The thread should perform any required initialisation and return true if it was able to initialise correctly and false if it has failed to initialise and should be shut down.
virtual bool Process (IReadableRingBufferWorkQueue::WorkItem &workItem)=0
 Called when a work item needs to be processed by the thread. Can indicate that you want to have NoItemsToProcess() called once each time the queue becomes empty by returning 'true'. Work item is not commited and removed from the queue until Process returns.
virtual bool Process (const BYTE *pData, DWORD dataLength)=0
 Called when a work item needs to be processed by the thread. Can indicate that you want to have NoItemsToProcess() called once each time the queue becomes empty by returning 'true'. Work item is committed and fully removed from the queue before Process is called and the data is passed to you using a local buffer.
virtual bool NoItemsToProcess ()
 Called once when the queue becomes empty if the last call to ProcessEx() or NoItemsToprocess() returned 'true'.
virtual void Shutdown ()=0
 Called when the thread is being shut down the thread can perform any required clean up tasks here.
virtual void OnProcessException (const _tstring &message)=0
 Called if an exception leaks from Process.
virtual void OnThreadTerminationException (const _tstring &message)=0
 Called if a thread is terminated due to an exception.

Protected Member Functions

virtual ~IRingBufferWorkPoolWorkerThreadCallback ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Constructor & Destructor Documentation

virtual ~IRingBufferWorkPoolWorkerThreadCallback (  )  [protected, virtual]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

virtual bool UseExtractionBuffer (  )  const [inline, virtual]

Called once, before the thread is first started. Return true to have the data to process extracted from the work item before calling into the worker thread and false to extract the data yourself.

virtual bool Initialise (  )  [pure virtual]

Called once when the thread is first started. The thread should perform any required initialisation and return true if it was able to initialise correctly and false if it has failed to initialise and should be shut down.

virtual bool Process ( IReadableRingBufferWorkQueue::WorkItem workItem  )  [pure virtual]

Called when a work item needs to be processed by the thread. Can indicate that you want to have NoItemsToProcess() called once each time the queue becomes empty by returning 'true'. Work item is not commited and removed from the queue until Process returns.

virtual bool Process ( const BYTE pData,
DWORD  dataLength 
) [pure virtual]

Called when a work item needs to be processed by the thread. Can indicate that you want to have NoItemsToProcess() called once each time the queue becomes empty by returning 'true'. Work item is committed and fully removed from the queue before Process is called and the data is passed to you using a local buffer.

virtual bool NoItemsToProcess (  )  [inline, virtual]

Called once when the queue becomes empty if the last call to ProcessEx() or NoItemsToprocess() returned 'true'.

virtual void Shutdown (  )  [pure virtual]

Called when the thread is being shut down the thread can perform any required clean up tasks here.

virtual void OnProcessException ( const _tstring message  )  [pure virtual]

Called if an exception leaks from Process.

virtual void OnThreadTerminationException ( const _tstring message  )  [pure virtual]

Called if a thread is terminated due to an exception.


Generated on Sun Sep 12 19:08:38 2021 for The Server Framework - v7.4 by doxygen 1.5.3