rippled
Public Member Functions | Private Attributes | Friends | List of all members
ripple::DatabaseBody::value_type Class Reference
Collaboration diagram for ripple::DatabaseBody::value_type:
Collaboration graph
[legend]

Public Member Functions

 ~value_type ()=default
 Destructor. More...
 
 value_type ()=default
 Constructor. More...
 
bool is_open () const
 Returns true if the file is open. More...
 
std::uint64_t size () const
 Returns the size of the file if open. More...
 
void close ()
 Close the file if open. More...
 
void open (boost::filesystem::path const &path, Config const &config, boost::asio::io_service &io_service, boost::system::error_code &ec)
 Open a file at the given path with the specified mode. More...
 

Private Attributes

std::uint64_t fileSize_ = 0
 
boost::filesystem::path path_
 
std::unique_ptr< DatabaseConconn_
 
std::string batch_
 
std::shared_ptr< boost::asio::io_service::strand > strand_
 
std::mutex m_
 
std::condition_variable c_
 
std::uint64_t handlerCount_ = 0
 
std::uint64_t part_ = 0
 
bool closing_ = false
 

Friends

class reader
 
struct DatabaseBody
 

Detailed Description

Definition at line 51 of file DatabaseBody.h.

Constructor & Destructor Documentation

◆ ~value_type()

ripple::DatabaseBody::value_type::~value_type ( )
default

Destructor.

◆ value_type()

ripple::DatabaseBody::value_type::value_type ( )
default

Constructor.

Member Function Documentation

◆ is_open()

bool ripple::DatabaseBody::value_type::is_open ( ) const

Returns true if the file is open.

Definition at line 80 of file DatabaseBody.h.

◆ size()

std::uint64_t ripple::DatabaseBody::value_type::size ( ) const

Returns the size of the file if open.

Definition at line 87 of file DatabaseBody.h.

◆ close()

void ripple::DatabaseBody::value_type::close ( )

Close the file if open.

◆ open()

void ripple::DatabaseBody::value_type::open ( boost::filesystem::path const &  path,
Config const &  config,
boost::asio::io_service &  io_service,
boost::system::error_code &  ec 
)

Open a file at the given path with the specified mode.

Parameters
pathThe utf-8 encoded path to the file
configThe configuration settings
io_serviceThe asio context for running a strand.
ecSet to the error, if any occurred

Friends And Related Function Documentation

◆ reader

friend class reader
friend

Definition at line 56 of file DatabaseBody.h.

◆ DatabaseBody

friend struct DatabaseBody
friend

Definition at line 57 of file DatabaseBody.h.

Member Data Documentation

◆ fileSize_

std::uint64_t ripple::DatabaseBody::value_type::fileSize_ = 0
private

Definition at line 60 of file DatabaseBody.h.

◆ path_

boost::filesystem::path ripple::DatabaseBody::value_type::path_
private

Definition at line 61 of file DatabaseBody.h.

◆ conn_

std::unique_ptr<DatabaseCon> ripple::DatabaseBody::value_type::conn_
private

Definition at line 62 of file DatabaseBody.h.

◆ batch_

std::string ripple::DatabaseBody::value_type::batch_
private

Definition at line 63 of file DatabaseBody.h.

◆ strand_

std::shared_ptr<boost::asio::io_service::strand> ripple::DatabaseBody::value_type::strand_
private

Definition at line 64 of file DatabaseBody.h.

◆ m_

std::mutex ripple::DatabaseBody::value_type::m_
private

Definition at line 65 of file DatabaseBody.h.

◆ c_

std::condition_variable ripple::DatabaseBody::value_type::c_
private

Definition at line 66 of file DatabaseBody.h.

◆ handlerCount_

std::uint64_t ripple::DatabaseBody::value_type::handlerCount_ = 0
private

Definition at line 67 of file DatabaseBody.h.

◆ part_

std::uint64_t ripple::DatabaseBody::value_type::part_ = 0
private

Definition at line 68 of file DatabaseBody.h.

◆ closing_

bool ripple::DatabaseBody::value_type::closing_ = false
private

Definition at line 69 of file DatabaseBody.h.