CCF
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions
files_cleanup_timer.h File Reference
#include "ccf/crypto/hash_provider.h"
#include "ccf/crypto/sha256_hash.h"
#include "ledger_filenames.h"
#include "snapshots/filenames.h"
#include "time_bound_logger.h"
#include "timer.h"
#include <algorithm>
#include <atomic>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <memory>
#include <optional>
#include <string>
#include <system_error>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  asynchost::FilesCleanupImpl
 

Namespaces

namespace  asynchost
 
namespace  asynchost::files_cleanup
 

Typedefs

using asynchost::FilesCleanupTimer = proxy_ptr< Timer< FilesCleanupImpl > >
 

Enumerations

enum class  asynchost::files_cleanup::DigestCheckResult : std::uint8_t { asynchost::files_cleanup::match_found , asynchost::files_cleanup::no_match , asynchost::files_cleanup::file_gone }
 

Functions

std::vector< std::pair< size_t, std::filesystem::path > > asynchost::files_cleanup::find_committed_ledger_chunks (const std::filesystem::path &dir)
 
std::optional< ccf::crypto::Sha256Hashasynchost::files_cleanup::hash_file (const std::filesystem::path &path)
 
DigestCheckResult asynchost::files_cleanup::check_digest_against_read_only_dirs (const std::filesystem::path &local_path, const std::vector< std::filesystem::path > &read_only_dirs)
 
std::optional< std::vector< std::pair< size_t, std::filesystem::path > > > asynchost::files_cleanup::find_committed_snapshots (const std::filesystem::path &dir)
 
std::optional< size_t > asynchost::files_cleanup::highest_committed_snapshot_seqno (const std::vector< std::pair< size_t, std::filesystem::path > > &committed_snapshots)
 
void asynchost::files_cleanup::cleanup_old_snapshots (const std::vector< std::pair< size_t, std::filesystem::path > > &committed_snapshots, size_t max_retained)
 
void asynchost::files_cleanup::cleanup_old_ledger_chunks (const std::filesystem::path &main_dir, const std::vector< std::filesystem::path > &read_only_dirs, size_t max_retained, std::optional< size_t > snapshot_watermark=std::nullopt)