Thrill
0.1
|
Specialization of block identifier class (BID) for variable size block size.
Stores block identity, given by file, offset within the file, and size of the block
#include <bid.hpp>
Public Member Functions | |
BID ()=default | |
BID (file *f, const external_size_type &o, size_t s) | |
bool | is_managed () const |
bool | operator!= (const BID< 0 > &b) const |
bool | operator== (const BID< 0 > &b) const |
request_ptr | read (void *data, size_t data_size, completion_handler on_complete=completion_handler()) |
Reads data from the disk(s). More... | |
bool | valid () const |
request_ptr | write (void *data, size_t data_size, completion_handler on_complete=completion_handler()) |
Writes data to the disk(s). More... | |
Public Attributes | |
external_size_type | offset = 0 |
offset within the file of the block (uint64_t) More... | |
size_t | size = 0 |
size of the block in bytes More... | |
file * | storage = nullptr |
pointer to the file of the block More... | |
Static Public Attributes | |
static constexpr size_t | t_size = 0 |
Blocks size, given by the parameter. More... | |
|
default |
|
inline |
|
inline |
Definition at line 135 of file bid.hpp.
References file::get_allocator_id(), and file::NO_ALLOCATOR.
|
inline |
Definition at line 159 of file bid.hpp.
References BID< Size >::operator==().
|
inline |
Definition at line 154 of file bid.hpp.
References BID< 0 >::offset, BID< 0 >::size, and BID< 0 >::storage.
|
inline |
|
inline |
external_size_type offset = 0 |
offset within the file of the block (uint64_t)
Definition at line 118 of file bid.hpp.
Referenced by BlockPool::EvictBlockLRU(), BID< 0 >::operator==(), BlockPool::PinBlock(), typed_block< RawSize, Type, NRef, MetaInfoType >::read(), and typed_block< RawSize, Type, NRef, MetaInfoType >::write().
size_t size = 0 |
size of the block in bytes
Definition at line 120 of file bid.hpp.
Referenced by BlockPool::EvictBlockLRU(), BID< 0 >::operator==(), typed_block< RawSize, Type, NRef, MetaInfoType >::read(), and typed_block< RawSize, Type, NRef, MetaInfoType >::write().
file* storage = nullptr |
pointer to the file of the block
Definition at line 116 of file bid.hpp.
Referenced by BlockPool::EvictBlockLRU(), BID< 0 >::operator==(), BlockPool::PinBlock(), typed_block< RawSize, Type, NRef, MetaInfoType >::read(), and typed_block< RawSize, Type, NRef, MetaInfoType >::write().
|
static |