![]() |
Kea 3.1.1
|
#include <blq_service.h>
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 . | |
Definition at line 28 of file blq_service.h.
|
virtual |
Destructor.
Definition at line 209 of file blq_service.cc.
References stopListener().
|
static |
TCP connection accept filter.
endpoint | The endpoint of the remote end of the TCP connection. |
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().
void isc::lease_query::BulkLeaseQueryService::checkListenerPausePermission | ( | ) |
Check listener current thread permissions to perform thread pool state transition.
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().
|
static |
Create a new instance of the BulkLeaseQueryService
.
impl | The lease query implementation (should not be null). |
advanced | The advanced configuration (should not be null). |
BadValue | on bad values. |
Definition at line 230 of file blq_service.cc.
References isc_throw.
|
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().
|
inline |
Returns the active query enabled flag.
Definition at line 150 of file blq_service.h.
|
inline |
Returns the bulk query enabled flag.
Definition at line 145 of file blq_service.h.
|
inline |
Returns the extended info tables enabled flag.
Definition at line 155 of file blq_service.h.
|
inline |
Configuration set/get methods.
Returns the protocol family.
Definition at line 140 of file blq_service.h.
|
inline |
Returns the lease query IP address.
Definition at line 160 of file blq_service.h.
|
inline |
Returns the lease query TCP port.
Definition at line 165 of file blq_service.h.
|
inline |
Returns the maximum number of bulk query processing threads.
Definition at line 170 of file blq_service.h.
|
inline |
Returns the maximum number of concurrent queries per connection.
Definition at line 193 of file blq_service.h.
|
inline |
Returns the maximum number of leases per fetch.
Definition at line 210 of file blq_service.h.
|
inline |
Returns the maximum number of requester connections.
Definition at line 182 of file blq_service.h.
|
inline |
Returns the maximum requester idle time.
Definition at line 205 of file blq_service.h.
|
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().
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().
|
static |
Reset the sole instance of BulkLeaseQueryService
.
Definition at line 220 of file blq_service.cc.
Referenced by unload().
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().
|
inline |
Sets the maximum number of bulk query processing threads.
max_bulk_query_threads | The new maximum. |
Definition at line 177 of file blq_service.h.
|
inline |
Sets the maximum number of concurrent queries per connection.
max_concurrent_queries | The new maximum. |
Definition at line 200 of file blq_service.h.
void isc::lease_query::BulkLeaseQueryService::setMaxLeasePerFetch | ( | size_t | max_leases_per_fetch | ) |
Sets the maximum number of leases per fetch.
max_leases_per_fetch | The new maximum. |
BadValue | when the new maximum is 0. |
Definition at line 254 of file blq_service.cc.
References isc_throw.
void isc::lease_query::BulkLeaseQueryService::setMaxRequesterConnections | ( | size_t | max_requester_connections | ) |
Sets the maximum number of requester connections.
max_requester_connections | New maximum. |
BadValue | when the new maximum is 0. |
Definition at line 246 of file blq_service.cc.
References isc_throw.
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().
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().