ScaleOut Native C++ API Library  5.1
 All Classes Functions Variables
sosscli::internal::HandlePool Class Reference

A static class which handles allocation of handles to the server. More...

#include <handle_pool.h>

Static Public Member Functions

static SOSSLIB_HANDLE get_handle ()
 Retrieve a handle from the handle pool. More...
 
static void release_handle (SOSSLIB_HANDLE hdl)
 Release a handle and return it to the handle pool.
 
static unsigned int handles_in_use (void)
 Retrieve a count of the number of handles currently available for use.
 
static void set_max_connections (unsigned int max_connections)
 Set the maximum number of server connections allowed. More...
 
static unsigned int max_connections (void)
 Get the maximum number of server connections allowed.
 

Static Public Attributes

static const int DEFAULT_POOL_SIZE = 32
 Default size of the HandlePool if HandlePool::set_max_connections is not called.
 

Detailed Description

A static class which handles allocation of handles to the server.

Member Function Documentation

static SOSSLIB_HANDLE sosscli::internal::HandlePool::get_handle ( )
static

Retrieve a handle from the handle pool.

If all handles are currently in use, this call will block indefinitely until a handle becomes available.

static void sosscli::internal::HandlePool::set_max_connections ( unsigned int  max_connections)
static

Set the maximum number of server connections allowed.

By default, the maximum number of server connections is HandlePool::DEFAULT_POOL_SIZE. To set a custom maximum number of connections for a client application, this function must be called before methods which access the handle pool, such as HandlePool::get_handle or HandlePool::available.


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