Kea 2.7.5
|
Resource race avoidance RAII handler for DHCPv4. More...
#include <resource_handler.h>
Public Member Functions | |
virtual | ~ResourceHandler4 () |
Destructor. | |
bool | isLocked4 (const asiolink::IOAddress &addr) |
Checks if a resource is owned by this handler. | |
bool | tryLock4 (const asiolink::IOAddress &addr) |
Tries to acquires a resource. | |
void | unLock4 (const asiolink::IOAddress &addr) |
Releases a resource. | |
Public Member Functions inherited from isc::dhcp::ResourceHandler | |
ResourceHandler () | |
Constructor. | |
virtual | ~ResourceHandler () |
Destructor. | |
bool | isLocked (Lease::Type type, const asiolink::IOAddress &addr) |
Checks if a resource is owned by this handler. | |
bool | tryLock (Lease::Type type, const asiolink::IOAddress &addr) |
Tries to acquires a resource. | |
void | unLock (Lease::Type type, const asiolink::IOAddress &addr) |
Releases a resource. | |
Resource race avoidance RAII handler for DHCPv4.
Definition at line 179 of file resource_handler.h.
|
inlinevirtual |
|
inline |
Checks if a resource is owned by this handler.
addr | The address aka the resource. |
Definition at line 203 of file resource_handler.h.
References isc::dhcp::ResourceHandler::isLocked(), and isc::dhcp::Lease::TYPE_V4.
|
inline |
Tries to acquires a resource.
Lookup the resource, if not found insert the resource in the resource container and return true, if found return false
addr | The address aka the resource. |
Definition at line 195 of file resource_handler.h.
References isc::dhcp::ResourceHandler::tryLock(), and isc::dhcp::Lease::TYPE_V4.
|
inline |
Releases a resource.
Remove the resource from the resource container.
addr | The address aka the resource. |
when | we do not own the resource. |
Definition at line 213 of file resource_handler.h.
References isc::dhcp::Lease::TYPE_V4, and isc::dhcp::ResourceHandler::unLock().