Search for usage in LXR

Akonadi::Server::CacheCleanerInhibitor Class Reference

#include <cachecleaner.h>

Public Member Functions

 CacheCleanerInhibitor (AkonadiServer &akonadi, bool inhibit=true)
void inhibit ()
void uninhibit ()

Detailed Description

A RAII helper class to temporarily stop the CacheCleaner.

This allows long-lasting operations to safely retrieve all data from resource and perform an operation on them (like move or copy) without risking that the cache will be cleaned in the meanwhile

The inhibitor is recursive, so it's possible to create multiple instances of the CacheCleanerInhibitor and the CacheCleaner will be inhibited until all instances are destroyed again. However it's not possible to inhibit a single inhibitor multiple times.

Definition at line 31 of file cachecleaner.h.

Constructor & Destructor Documentation

◆ CacheCleanerInhibitor()

CacheCleanerInhibitor::CacheCleanerInhibitor ( AkonadiServer & akonadi,
bool inhibit = true )

Definition at line 25 of file cachecleaner.cpp.

◆ ~CacheCleanerInhibitor()

CacheCleanerInhibitor::~CacheCleanerInhibitor ( )

Definition at line 33 of file cachecleaner.cpp.

Member Function Documentation

◆ inhibit()

void CacheCleanerInhibitor::inhibit ( )

Definition at line 40 of file cachecleaner.cpp.

◆ uninhibit()

void CacheCleanerInhibitor::uninhibit ( )

Definition at line 57 of file cachecleaner.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:58:19 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.