mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 14:42:02 +00:00
add note
This commit is contained in:
parent
081cd4938a
commit
61b580aba4
@ -22,9 +22,8 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
/**
|
||||
* Local cache for remote filesystem files, represented as a set of non-overlapping non-empty file segments.
|
||||
*/
|
||||
/// Local cache for remote filesystem files, represented as a set of non-overlapping non-empty file segments.
|
||||
/// Different caching algorithms are implemented based on IFileCachePriority.
|
||||
class FileCache : private boost::noncopyable
|
||||
{
|
||||
friend class FileSegment;
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
|
||||
virtual size_t hits() const = 0;
|
||||
|
||||
/// Point the iterator to the next higher priority cache record.
|
||||
virtual void next() const = 0;
|
||||
|
||||
virtual bool valid() const = 0;
|
||||
@ -72,6 +73,8 @@ public:
|
||||
/// Deletes an existing cached record.
|
||||
virtual void remove(std::lock_guard<std::mutex> &) = 0;
|
||||
|
||||
/// Get an iterator to handle write operations. Write iterators should only
|
||||
/// be allowed to call remove, use and incrementSize methods.
|
||||
virtual WriteIterator getWriteIterator() const = 0;
|
||||
|
||||
virtual void incrementSize(size_t, std::lock_guard<std::mutex> &) = 0;
|
||||
|
@ -5,8 +5,8 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
/// Based on the LRU algorithm implementation, the data with the lowest priority is stored at
|
||||
/// the head of the queue, and the data with the highest priority is stored at the tail.
|
||||
/// Based on the LRU algorithm implementation, the record with the lowest priority is stored at
|
||||
/// the head of the queue, and the record with the highest priority is stored at the tail.
|
||||
class LRUFileCachePriority : public IFileCachePriority
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user