osgDB::DatabasePager::DatabaseThread Class Reference

`#include <DatabasePager>`

Inheritance diagram for osgDB::DatabasePager::DatabaseThread:

## Public Types

enum | Mode { HANDLE_ALL_REQUESTS , HANDLE_NON_HTTP , HANDLE_ONLY_HTTP }
Public Types inherited from OpenThreads::Thread
enum | ThreadPriority { THREAD_PRIORITY_MAX , THREAD_PRIORITY_HIGH , THREAD_PRIORITY_NOMINAL , THREAD_PRIORITY_LOW , THREAD_PRIORITY_MIN , THREAD_PRIORITY_DEFAULT }
enum | ThreadPolicy { THREAD_SCHEDULE_FIFO , THREAD_SCHEDULE_ROUND_ROBIN , THREAD_SCHEDULE_TIME_SHARE , THREAD_SCHEDULE_DEFAULT }

## Public Member Functions

| DatabaseThread (DatabasePager *pager, Mode mode, const std::string &name)
| DatabaseThread (const DatabaseThread &dt, DatabasePager *pager)
void | setName (const std::string &name)
const std::string & | getName () const
void | setDone (bool done)
bool | getDone () const
void | setActive (bool active)
bool | getActive () const
virtual int | cancel ()
virtual void | run ()
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
virtual void | setThreadSafeRefUnref (bool)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const
Public Member Functions inherited from OpenThreads::Thread
| Thread ()
virtual | ~Thread ()
size_t | getThreadId ()
size_t | getProcessId ()
int | start ()
int | startThread ()
int | testCancel ()
int | setSchedulePriority (ThreadPriority priority)
int | getSchedulePriority ()
int | setSchedulePolicy (ThreadPolicy policy)
int | getSchedulePolicy ()
int | setStackSize (size_t size)
size_t | getStackSize ()
void | printSchedulingInfo ()
int | detach ()
int | join ()
int | setCancelModeDisable ()
int | setCancelModeAsynchronous ()
int | setCancelModeDeferred ()
bool | isRunning ()
virtual void | cancelCleanup ()
void * | getImplementation ()
int | setProcessorAffinity (const Affinity &affinity)

## Protected Member Functions

virtual | ~DatabaseThread ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

OpenThreads::Atomic | _done
volatile bool | _active
DatabasePager * | _pager
Mode | _mode
std::string | _name
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()
Static Public Member Functions inherited from OpenThreads::Thread
static int | SetConcurrency (int concurrencyLevel)
static int | GetConcurrency ()
static Thread * | CurrentThread ()
static size_t | CurrentThreadId ()
static void | Init ()
static int | YieldCurrentThread ()
static ThreadPriority | GetMasterPriority ()
static int | microSleep (unsigned int microsec)

## Member Enumeration Documentation

## Mode

enum osgDB::DatabasePager::DatabaseThread::Mode

Enumerator
HANDLE_ALL_REQUESTS |
HANDLE_NON_HTTP |
HANDLE_ONLY_HTTP |

## Constructor & Destructor Documentation

## DatabaseThread() [1/2]

osgDB::DatabasePager::DatabaseThread::DatabaseThread | ( | DatabasePager * | pager,
|  | Mode | mode,
|  | const std::string & | name )

References osgDB::DatabasePager::DatabasePager().

Referenced by DatabaseThread().

## DatabaseThread() [2/2]

osgDB::DatabasePager::DatabaseThread::DatabaseThread | ( | const DatabaseThread & | dt,
|  | DatabasePager * | pager )

References osgDB::DatabasePager::DatabasePager(), and DatabaseThread().

## ~DatabaseThread()

virtual osgDB::DatabasePager::DatabaseThread::~DatabaseThread | ( |  | ) |

protected virtual

## Member Function Documentation

## cancel()

virtual int osgDB::DatabasePager::DatabaseThread::cancel | ( |  | ) |

virtual

Cancel the thread. Equivalent to SIGKILL.

Returns
  0 if normal, -1 if errno set, errno code otherwise.

Reimplemented from OpenThreads::Thread.

## getActive()

bool osgDB::DatabasePager::DatabaseThread::getActive | ( |  | ) | const

inline

References _active.

## getDone()

bool osgDB::DatabasePager::DatabaseThread::getDone | ( |  | ) | const

inline

References _done.

## getName()

const std::string & osgDB::DatabasePager::DatabaseThread::getName | ( |  | ) | const

inline

References _name.

## run()

virtual void osgDB::DatabasePager::DatabaseThread::run | ( |  | ) |

virtual

Thread's run method. Must be implemented by derived classes. This is where the action happens.

Implements OpenThreads::Thread.

## setActive()

void osgDB::DatabasePager::DatabaseThread::setActive | ( | bool | active | ) |

inline

References _active.

## setDone()

void osgDB::DatabasePager::DatabaseThread::setDone | ( | bool | done | ) |

inline

References _done.

## setName()

void osgDB::DatabasePager::DatabaseThread::setName | ( | const std::string & | name | ) |

inline

References _name.

## Member Data Documentation

## _active

volatile bool osgDB::DatabasePager::DatabaseThread::_active

protected

Referenced by getActive(), and setActive().

## _done

OpenThreads::Atomic osgDB::DatabasePager::DatabaseThread::_done

protected

Referenced by getDone(), and setDone().

## _mode

Mode osgDB::DatabasePager::DatabaseThread::_mode

protected

## _name

std::string osgDB::DatabasePager::DatabaseThread::_name

protected

Referenced by getName(), and setName().

## _pager

DatabasePager* osgDB::DatabasePager::DatabaseThread::_pager

protected

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

- DatabasePager