| Kea 3.0.2-git

isc::lease_query::BulkLeaseQueryService Class Reference

`#include <blq_service.h>`

Inheritance diagram for isc::lease_query::BulkLeaseQueryService:
[legend]

## Classes
class | AdvancedConfig
| Manages (advanced) configuration. More...

## Public Member Functions
virtual | ~BulkLeaseQueryService ()
| Destructor.
void | checkListenerPausePermission ()
| Check listener current thread permissions to perform thread pool state transition.
void | pauseListener ()
| Pauses listener thread pool operations.
void | resumeListener ()
| Resumes listener thread pool operations.
void | startListener ()
| Start the listener instance.
void | stopListener ()
| Stop the listener instance.
uint16_t | getFamily () const
| Configuration set/get methods.
bool | getBulkQueryEnabled () const
| Returns the bulk query enabled flag.
bool | getActiveQueryEnabled () const
| Returns the active query enabled flag.
bool | getExtendedInfoTablesEnabled () const
| Returns the extended info tables enabled flag.
const isc::asiolink::IOAddress & | getLeaseQueryIp () const
| Returns the lease query IP address.
uint16_t | getLeaseQueryTcpPort () const
| Returns the lease query TCP port.
size_t | getMaxBulkQueryThreads () const
| Returns the maximum number of bulk query processing threads.
void | setMaxBulkQueryThreads (size_t max_bulk_query_threads)
| Sets the maximum number of bulk query processing threads.
size_t | getMaxRequesterConnections () const
| Returns the maximum number of requester connections.
void | setMaxRequesterConnections (size_t max_requester_connections)
| Sets the maximum number of requester connections.
size_t | getMaxConcurrentQueries () const
| Returns the maximum number of concurrent queries per connection.
void | setMaxConcurrentQueries (size_t max_concurrent_queries)
| Sets the maximum number of concurrent queries per connection.
long | getMaxRequesterIdleTime () const
| Returns the maximum requester idle time.
size_t | getMaxLeasePerFetch () const
| Returns the maximum number of leases per fetch.
void | setMaxLeasePerFetch (size_t max_leases_per_fetch)
| Sets the maximum number of leases per fetch.

## Static Public Member Functions
static bool | acceptFilter (const boost::asio::ip::tcp::endpoint &endpoint)
| TCP connection accept filter.
static void | create (LeaseQueryImpl *impl, isc::data::ConstElementPtr advanced)
| Create a new instance of the `BulkLeaseQueryService`.
static void | doStartListener ()
| Start the listener.
static BulkLeaseQueryServicePtr | instance ()
| Returns a pointer to the sole instance of the `BulkLeaseQueryService`, can return null.
static void | reset ()
| Reset the sole instance of `BulkLeaseQueryService`.

## Detailed Description

Definition at line 28 of file blq_service.h.

## Constructor & Destructor Documentation

## ◆ ~BulkLeaseQueryService()

isc::lease_query::BulkLeaseQueryService::~BulkLeaseQueryService | ( |  | ) |
| virtual

Destructor.

Definition at line 209 of file blq_service.cc.

References stopListener().

Here is the call graph for this function:

## Member Function Documentation

## ◆ acceptFilter()

bool isc::lease_query::BulkLeaseQueryService::acceptFilter | ( | const boost::asio::ip::tcp::endpoint & | endpoint | ) |
| static

TCP connection accept filter.

Parameters

  endpoint | The endpoint of the remote end of the TCP connection.

Returns
  True if the connection should be accepted, False if it should be dropped i.e. immediately closed.

Definition at line 345 of file blq_service.cc.

References isc::lease_query::BULK_LEASE_QUERY_REJECTED_CONNECTION, instance(), isc::lease_query::lease_query_logger, LOG_ERROR, isc::tcp::TcpConnection::NO_ENDPOINT(), isc::lease_query::LeaseQueryImpl::terminated_, and isc::asiolink::IOAddress::toText().

Here is the call graph for this function:

## ◆ checkListenerPausePermission()

void isc::lease_query::BulkLeaseQueryService::checkListenerPausePermission | ( |  | ) |

Check listener current thread permissions to perform thread pool state transition.

Exceptions

  MultiThreadingInvalidOperation | if the state transition is done on any of the worker threads.

Definition at line 275 of file blq_service.cc.

References isc::lease_query::BULK_LEASE_QUERY_PAUSE_CHECK_PERMISSIONS_FAILED, isc::lease_query::BULK_LEASE_QUERY_PAUSE_LISTENER_ILLEGAL, isc_throw, isc::lease_query::lease_query_logger, LOG_ERROR, and isc::Exception::what().

Referenced by startListener().

Here is the call graph for this function:

## ◆ create()

void isc::lease_query::BulkLeaseQueryService::create | ( | LeaseQueryImpl * | impl,
|  | isc::data::ConstElementPtr | advanced )
| static

Create a new instance of the `BulkLeaseQueryService`.

Parameters

  impl | The lease query implementation (should not be null).
  advanced | The advanced configuration (should not be null).

Exceptions

  BadValue | on bad values.

Definition at line 230 of file blq_service.cc.

References isc_throw.

## ◆ doStartListener()

void isc::lease_query::BulkLeaseQueryService::doStartListener | ( |  | ) |
| static

Start the listener.

Posted from dhcp6_srv_configured callout.

Definition at line 400 of file blq_service.cc.

References isc::lease_query::BULK_LEASE_QUERY_LISTENER_START_FAILED, instance(), isc::lease_query::lease_query_logger, and LOG_ERROR.

Referenced by dhcp4_srv_configured(), and dhcp6_srv_configured().

Here is the call graph for this function:

## ◆ getActiveQueryEnabled()

bool isc::lease_query::BulkLeaseQueryService::getActiveQueryEnabled | ( |  | ) | const
| inline

Returns the active query enabled flag.

Definition at line 150 of file blq_service.h.

## ◆ getBulkQueryEnabled()

bool isc::lease_query::BulkLeaseQueryService::getBulkQueryEnabled | ( |  | ) | const
| inline

Returns the bulk query enabled flag.

Definition at line 145 of file blq_service.h.

## ◆ getExtendedInfoTablesEnabled()

bool isc::lease_query::BulkLeaseQueryService::getExtendedInfoTablesEnabled | ( |  | ) | const
| inline

Returns the extended info tables enabled flag.

Definition at line 155 of file blq_service.h.

## ◆ getFamily()

uint16_t isc::lease_query::BulkLeaseQueryService::getFamily | ( |  | ) | const
| inline

Configuration set/get methods.

Returns the protocol family.

Definition at line 140 of file blq_service.h.

## ◆ getLeaseQueryIp()

const isc::asiolink::IOAddress & isc::lease_query::BulkLeaseQueryService::getLeaseQueryIp | ( |  | ) | const
| inline

Returns the lease query IP address.

Definition at line 160 of file blq_service.h.

## ◆ getLeaseQueryTcpPort()

uint16_t isc::lease_query::BulkLeaseQueryService::getLeaseQueryTcpPort | ( |  | ) | const
| inline

Returns the lease query TCP port.

Definition at line 165 of file blq_service.h.

## ◆ getMaxBulkQueryThreads()

size_t isc::lease_query::BulkLeaseQueryService::getMaxBulkQueryThreads | ( |  | ) | const
| inline

Returns the maximum number of bulk query processing threads.

Definition at line 170 of file blq_service.h.

## ◆ getMaxConcurrentQueries()

size_t isc::lease_query::BulkLeaseQueryService::getMaxConcurrentQueries | ( |  | ) | const
| inline

Returns the maximum number of concurrent queries per connection.

Definition at line 193 of file blq_service.h.

## ◆ getMaxLeasePerFetch()

size_t isc::lease_query::BulkLeaseQueryService::getMaxLeasePerFetch | ( |  | ) | const
| inline

Returns the maximum number of leases per fetch.

Definition at line 210 of file blq_service.h.

## ◆ getMaxRequesterConnections()

size_t isc::lease_query::BulkLeaseQueryService::getMaxRequesterConnections | ( |  | ) | const
| inline

Returns the maximum number of requester connections.

Definition at line 182 of file blq_service.h.

## ◆ getMaxRequesterIdleTime()

long isc::lease_query::BulkLeaseQueryService::getMaxRequesterIdleTime | ( |  | ) | const
| inline

Returns the maximum requester idle time.

Definition at line 205 of file blq_service.h.

## ◆ instance()

BulkLeaseQueryServicePtr isc::lease_query::BulkLeaseQueryService::instance | ( |  | ) |
| static

Returns a pointer to the sole instance of the `BulkLeaseQueryService`, can return null.

Definition at line 225 of file blq_service.cc.

Referenced by isc::lease_query::LeaseQueryImpl6::LeaseQueryImpl6(), acceptFilter(), doStartListener(), isc::lease_query::BulkLeaseQuery4::init(), isc::lease_query::BulkLeaseQuery6::init(), and isc::lease_query::BulkLeaseQuery4::send().

## ◆ pauseListener()

void isc::lease_query::BulkLeaseQueryService::pauseListener | ( |  | ) |

Pauses listener thread pool operations.

Suspends the listener thread pool event processing. Serves as the MultiThreading critical section entry callback.

Definition at line 302 of file blq_service.cc.

References isc::lease_query::BULK_LEASE_QUERY_PAUSE_LISTENER_FAILED, isc_throw, isc::lease_query::lease_query_logger, and LOG_ERROR.

Referenced by startListener().

## ◆ reset()

void isc::lease_query::BulkLeaseQueryService::reset | ( |  | ) |
| static

Reset the sole instance of `BulkLeaseQueryService`.

Definition at line 220 of file blq_service.cc.

Referenced by unload().

## ◆ resumeListener()

void isc::lease_query::BulkLeaseQueryService::resumeListener | ( |  | ) |

Resumes listener thread pool operations.

Resumes listener thread pool event processing. Serves as the MultiThreading critical section exit callback.

Definition at line 319 of file blq_service.cc.

References isc::lease_query::BULK_LEASE_QUERY_RESUME_LISTENER_FAILED, isc_throw, isc::lease_query::lease_query_logger, and LOG_ERROR.

Referenced by startListener().

## ◆ setMaxBulkQueryThreads()

void isc::lease_query::BulkLeaseQueryService::setMaxBulkQueryThreads | ( | size_t | max_bulk_query_threads | ) |
| inline

Sets the maximum number of bulk query processing threads.

Parameters

  max_bulk_query_threads | The new maximum.

Definition at line 177 of file blq_service.h.

## ◆ setMaxConcurrentQueries()

void isc::lease_query::BulkLeaseQueryService::setMaxConcurrentQueries | ( | size_t | max_concurrent_queries | ) |
| inline

Sets the maximum number of concurrent queries per connection.

Parameters

  max_concurrent_queries | The new maximum.

Definition at line 200 of file blq_service.h.

## ◆ setMaxLeasePerFetch()

void isc::lease_query::BulkLeaseQueryService::setMaxLeasePerFetch | ( | size_t | max_leases_per_fetch | ) |

Sets the maximum number of leases per fetch.

Parameters

  max_leases_per_fetch | The new maximum.

Exceptions

  BadValue | when the new maximum is 0.

Definition at line 254 of file blq_service.cc.

References isc_throw.

## ◆ setMaxRequesterConnections()

void isc::lease_query::BulkLeaseQueryService::setMaxRequesterConnections | ( | size_t | max_requester_connections | ) |

Sets the maximum number of requester connections.

Parameters

  max_requester_connections | New maximum.

Exceptions

  BadValue | when the new maximum is 0.

Definition at line 246 of file blq_service.cc.

References isc_throw.

## ◆ startListener()

void isc::lease_query::BulkLeaseQueryService::startListener | ( |  | ) |

Start the listener instance.

Starts the listener's thread pool and registers pauseListener() and resumeListener() as the MultiThreading critical section entry and exit callbacks, respectively.

Definition at line 262 of file blq_service.cc.

References isc::util::MultiThreadingMgr::addCriticalSectionCallbacks(), checkListenerPausePermission(), isc::util::MultiThreadingMgr::instance(), pauseListener(), and resumeListener().

Here is the call graph for this function:

## ◆ stopListener()

void isc::lease_query::BulkLeaseQueryService::stopListener | ( |  | ) |

Stop the listener instance.

It unregisters the MultiThreading critical section callbacks, closes all connections and stops the listener's thread pool.

Definition at line 336 of file blq_service.cc.

References isc::util::MultiThreadingMgr::instance(), and isc::util::MultiThreadingMgr::removeCriticalSectionCallbacks().

Referenced by ~BulkLeaseQueryService().

Here is the call graph for this function:

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

- blq_service.h
- blq_service.cc