| Kea 3.0.2-git

cache_host_data_source.h
Go to the documentation of this file.
1// Copyright (C) 2018-2020 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef CACHE_HOST_DATA_SOURCE_H
8#define CACHE_HOST_DATA_SOURCE_H
9
10#include <dhcpsrv/base_host_data_source.h>
11
12 namespace isc {
13 namespace dhcp {
14
18 class CacheHostDataSource : public virtual BaseHostDataSource {
19 public:
20
22 virtual ~CacheHostDataSource() { }
23
33 virtual size_t insert(const ConstHostPtr& host, bool overwrite) = 0;
34
44 virtual bool remove(const HostPtr& host) = 0;
45
49 virtual void flush(size_t count) = 0;
50
54 virtual size_t size() const = 0;
55
59 virtual size_t capacity() const = 0;
60};
61
63 typedef boost::shared_ptr<CacheHostDataSource> CacheHostDataSourcePtr;
64
65} // end of namespace isc::dhcp
66} // end of namespace isc
67
68#endif // CACHE_HOST_DATA_SOURCE_H
base_host_data_source.h
isc::dhcp::BaseHostDataSource
Base interface for the classes implementing simple data source for host reservations.
Definition base_host_data_source.h:88
isc::dhcp::CacheHostDataSource
Abstract interface extending base simple data source for host reservations to host cache.
Definition cache_host_data_source.h:18
isc::dhcp::CacheHostDataSource::capacity
virtual size_t capacity() const =0
Return the maximum number of entries.
isc::dhcp::CacheHostDataSource::size
virtual size_t size() const =0
Return the number of entries.
isc::dhcp::CacheHostDataSource::remove
virtual bool remove(const HostPtr &host)=0
Remove a host from the cache.
isc::dhcp::CacheHostDataSource::flush
virtual void flush(size_t count)=0
Flush entries.
isc::dhcp::CacheHostDataSource::insert
virtual size_t insert(const ConstHostPtr &host, bool overwrite)=0
Insert a host into the cache.
isc::dhcp::CacheHostDataSource::~CacheHostDataSource
virtual ~CacheHostDataSource()
Default destructor implementation.
Definition cache_host_data_source.h:22
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc::dhcp::HostPtr
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition host.h:837
isc::dhcp::CacheHostDataSourcePtr
boost::shared_ptr< CacheHostDataSource > CacheHostDataSourcePtr
CacheHostDataSource pointer.
Definition cache_host_data_source.h:63
isc::dhcp::ConstHostPtr
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
Definition host.h:840
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148