Kea 1.5.0
cache_host_data_source.h
Go to the documentation of this file.
1// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the End User License
4// Agreement. See COPYING file in the premium/ directory.
5
6#ifndef CACHE_HOST_DATA_SOURCE_H
7#define CACHE_HOST_DATA_SOURCE_H
8
10
11namespace isc {
12namespace dhcp {
13
18public:
19
22
32 virtual size_t insert(const ConstHostPtr& host, bool overwrite) = 0;
33
43 virtual bool remove(const HostPtr& host) = 0;
44
48 virtual void flush(size_t count) = 0;
49
53 virtual size_t size() const = 0;
54
58 virtual size_t capacity() const = 0;
59};
60
62typedef boost::shared_ptr<CacheHostDataSource> CacheHostDataSourcePtr;
63
64} // end of namespace isc::dhcp
65} // end of namespace isc
66
67#endif // CACHE_HOST_DATA_SOURCE_H
Base interface for the classes implementing simple data source for host reservations.
Abstract interface extending base simple data source for host reservations to host cache.
virtual size_t capacity() const =0
Return the maximum number of entries.
virtual size_t size() const =0
Return the number of entries.
virtual bool remove(const HostPtr &host)=0
Remove a host from the cache.
virtual void flush(size_t count)=0
Flush entries.
virtual size_t insert(const ConstHostPtr &host, bool overwrite)=0
Insert a host into the cache.
virtual ~CacheHostDataSource()
Default destructor implementation.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition: host.h:725
boost::shared_ptr< CacheHostDataSource > CacheHostDataSourcePtr
CacheHostDataSource pointer.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
Definition: host.h:728
Defines the logger used by the top-level component of kea-dhcp-ddns.