16#include <boost/noncopyable.hpp>
28class BulkLeaseQueryService : boost::noncopyable {
45 "127.0.0.1" :
"::1")),
141 return (config_.family_);
146 return (config_.bulk_query_enabled_);
151 return (config_.active_query_enabled_);
156 return (config_.extended_info_tables_enabled_);
161 return (config_.lease_query_ip_);
166 return (config_.lease_query_tcp_port_);
171 return (config_.max_bulk_query_threads_);
178 config_.max_bulk_query_threads_ = max_bulk_query_threads;
183 return (config_.max_requester_connections_);
194 return (config_.max_concurrent_queries_);
201 config_.max_concurrent_queries_ = max_concurrent_queries;
206 return (config_.max_requester_idle_time_);
211 return (config_.max_leases_per_fetch_);
258 static bool acceptFilter(
const boost::asio::ip::tcp::endpoint& endpoint);
266 const AdvancedConfig&
config);
275 AdvancedConfig config_;
The IOAddress class represents an IP addresses (version agnostic)
AdvancedConfig(uint16_t family)
Constructor.
bool bulk_query_enabled_
Bulk query flag (default false).
std::string cert_file_
TLS server certificate file name (not yet used).
size_t max_concurrent_queries_
Maximum number of concurrent queries per connection.
std::string key_file_
TLS server private key file name (not yet used).
size_t max_leases_per_fetch_
Maximum number of leases per fetch (default 100).
size_t max_bulk_query_threads_
Maximum number of bulk query processing threads (default 0).
std::string trust_anchor_
TLS trust anchor (not yet used).
isc::asiolink::IOAddress lease_query_ip_
Lease query IP (default 127.0.0.1 or ::1).
long max_requester_idle_time_
Maximum requester idle time (default 300 seconds).
bool extended_info_tables_enabled_
Extended info tables flag (default same as Bulk query).
bool active_query_enabled_
Active query flag (always false).
bool cert_required_
TLS client certificate required flag (not yet used).
static const isc::data::SimpleKeywords CONFIG_KEYWORDS
Keywords for advanced configuration.
size_t max_requester_connections_
Maximum number of requester connections (default 10).
void parse(isc::data::ConstElementPtr advanced)
Parse the advanced argument.
uint16_t lease_query_tcp_port_
Lease query TCP port (default 67 or 547).
uint16_t family_
Protocol family of the list (AF_INET or AF_INET6).
bool getActiveQueryEnabled() const
Returns the active query enabled flag.
void setMaxConcurrentQueries(size_t max_concurrent_queries)
Sets the maximum number of concurrent queries per connection.
bool getBulkQueryEnabled() const
Returns the bulk query enabled flag.
void checkListenerPausePermission()
Check listener current thread permissions to perform thread pool state transition.
const isc::asiolink::IOAddress & getLeaseQueryIp() const
Returns the lease query IP address.
bool getExtendedInfoTablesEnabled() const
Returns the extended info tables enabled flag.
virtual ~BulkLeaseQueryService()
Destructor.
uint16_t getLeaseQueryTcpPort() const
Returns the lease query TCP port.
static bool acceptFilter(const boost::asio::ip::tcp::endpoint &endpoint)
TCP connection accept filter.
void pauseListener()
Pauses listener thread pool operations.
static BulkLeaseQueryServicePtr instance()
Returns a pointer to the sole instance of the BulkLeaseQueryService, can return null.
size_t getMaxBulkQueryThreads() const
Returns the maximum number of bulk query processing threads.
size_t getMaxLeasePerFetch() const
Returns the maximum number of leases per fetch.
size_t getMaxRequesterConnections() const
Returns the maximum number of requester connections.
uint16_t getFamily() const
Configuration set/get methods.
static void reset()
Reset the sole instance of BulkLeaseQueryService.
void stopListener()
Stop the listener instance.
size_t getMaxConcurrentQueries() const
Returns the maximum number of concurrent queries per connection.
long getMaxRequesterIdleTime() const
Returns the maximum requester idle time.
void resumeListener()
Resumes listener thread pool operations.
void setMaxRequesterConnections(size_t max_requester_connections)
Sets the maximum number of requester connections.
static void create(LeaseQueryImpl *impl, isc::data::ConstElementPtr advanced)
Create a new instance of the BulkLeaseQueryService.
void setMaxLeasePerFetch(size_t max_leases_per_fetch)
Sets the maximum number of leases per fetch.
void setMaxBulkQueryThreads(size_t max_bulk_query_threads)
Sets the maximum number of bulk query processing threads.
void startListener()
Start the listener instance.
static void doStartListener()
Start the listener.
Provides configuration and control flow for processing queries.
A wrapper interface for the ASIO library.
boost::shared_ptr< const Element > ConstElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< MtLeaseQueryListenerMgr > MtLeaseQueryListenerMgrPtr
Defines a shared pointer to MtLeaseQueryListenerMgr.
boost::shared_ptr< BulkLeaseQueryService > BulkLeaseQueryServicePtr
Defines a shared pointer to BulkLeaseQueryService.
Defines the logger used by the top-level component of kea-lfc.