Kea  2.3.5-git
isc::log::interprocess::InterprocessSyncNull Class Reference

Null Interprocess Sync Class. More...

#include <interprocess_sync_null.h>

+ Inheritance diagram for isc::log::interprocess::InterprocessSyncNull:

Public Member Functions

 InterprocessSyncNull (const std::string &task_name)
 Constructor. More...
 
virtual ~InterprocessSyncNull ()
 Destructor. More...
 
- Public Member Functions inherited from isc::log::interprocess::InterprocessSync
 InterprocessSync (const std::string &task_name)
 Constructor. More...
 
virtual ~InterprocessSync ()
 Destructor. More...
 

Protected Member Functions

bool lock ()
 Acquire the lock (never blocks) More...
 
bool tryLock ()
 Try to acquire a lock (doesn't block) More...
 
bool unlock ()
 Release the lock. More...
 

Additional Inherited Members

- Protected Attributes inherited from isc::log::interprocess::InterprocessSync
bool is_locked_
 Is the lock taken? More...
 
const std::string task_name_
 The task name. More...
 

Detailed Description

Null Interprocess Sync Class.

This class specifies a concrete implementation for a null (no effect) interprocess synchronization mechanism. Please see the InterprocessSync class documentation for usage.

Definition at line 21 of file interprocess_sync_null.h.

Constructor & Destructor Documentation

◆ InterprocessSyncNull()

isc::log::interprocess::InterprocessSyncNull::InterprocessSyncNull ( const std::string &  task_name)
inline

Constructor.

Creates a null interprocess synchronization object

Parameters
task_nameName of the synchronization task. This has to be identical among the various processes that need to be synchronized for the same task.

Definition at line 30 of file interprocess_sync_null.h.

References lock(), tryLock(), unlock(), and ~InterprocessSyncNull().

+ Here is the call graph for this function:

◆ ~InterprocessSyncNull()

isc::log::interprocess::InterprocessSyncNull::~InterprocessSyncNull ( )
virtual

Destructor.

Definition at line 15 of file interprocess_sync_null.cc.

Referenced by InterprocessSyncNull().

Member Function Documentation

◆ lock()

bool isc::log::interprocess::InterprocessSyncNull::lock ( )
protectedvirtual

Acquire the lock (never blocks)

Returns
Always returns true

Implements isc::log::interprocess::InterprocessSync.

Definition at line 19 of file interprocess_sync_null.cc.

References isc::log::interprocess::InterprocessSync::is_locked_.

Referenced by InterprocessSyncNull().

◆ tryLock()

bool isc::log::interprocess::InterprocessSyncNull::tryLock ( )
protectedvirtual

Try to acquire a lock (doesn't block)

Returns
Always returns true

Implements isc::log::interprocess::InterprocessSync.

Definition at line 25 of file interprocess_sync_null.cc.

References isc::log::interprocess::InterprocessSync::is_locked_.

Referenced by InterprocessSyncNull().

◆ unlock()

bool isc::log::interprocess::InterprocessSyncNull::unlock ( )
protectedvirtual

Release the lock.

Returns
Always returns true

Implements isc::log::interprocess::InterprocessSync.

Definition at line 31 of file interprocess_sync_null.cc.

References isc::log::interprocess::InterprocessSync::is_locked_.

Referenced by InterprocessSyncNull().


The documentation for this class was generated from the following files: