An asynchronous connection to a NFS server.
More...
#include <Connection.hxx>
|
| gcc_nonnull_all | NfsConnection (EventLoop &_loop, const char *_server, const char *_export_name) noexcept |
| |
| | ~NfsConnection () |
| | Must be run from EventLoop's thread. More...
|
| |
| gcc_pure const char * | GetServer () const noexcept |
| |
| gcc_pure const char * | GetExportName () const noexcept |
| |
| EventLoop & | GetEventLoop () noexcept |
| |
| void | AddLease (NfsLease &lease) |
| | Ensure that the connection is established. More...
|
| |
| void | RemoveLease (NfsLease &lease) |
| |
| void | Stat (const char *path, NfsCallback &callback) |
| |
| void | OpenDirectory (const char *path, NfsCallback &callback) |
| |
| const struct nfsdirent * | ReadDirectory (struct nfsdir *dir) |
| |
| void | CloseDirectory (struct nfsdir *dir) |
| |
| void | Open (const char *path, int flags, NfsCallback &callback) |
| | Throws std::runtime_error on error. More...
|
| |
| void | Stat (struct nfsfh *fh, NfsCallback &callback) |
| |
| void | Read (struct nfsfh *fh, uint64_t offset, size_t size, NfsCallback &callback) |
| | Throws std::runtime_error on error. More...
|
| |
| void | Cancel (NfsCallback &callback) |
| |
| void | Close (struct nfsfh *fh) |
| |
| void | CancelAndClose (struct nfsfh *fh, NfsCallback &callback) |
| |
An asynchronous connection to a NFS server.
Definition at line 42 of file Connection.hxx.
◆ NfsConnection()
◆ ~NfsConnection()
| NfsConnection::~NfsConnection |
( |
| ) |
|
◆ AddLease()
| void NfsConnection::AddLease |
( |
NfsLease & |
lease | ) |
|
Ensure that the connection is established.
The connection is kept up while at least one NfsLease is registered.
This method is thread-safe. However, NfsLease's methods will be invoked from within the EventLoop's thread.
◆ Cancel()
◆ CancelAndClose()
| void NfsConnection::CancelAndClose |
( |
struct nfsfh * |
fh, |
|
|
NfsCallback & |
callback |
|
) |
| |
◆ Close()
| void NfsConnection::Close |
( |
struct nfsfh * |
fh | ) |
|
◆ CloseDirectory()
| void NfsConnection::CloseDirectory |
( |
struct nfsdir * |
dir | ) |
|
◆ GetEventLoop()
◆ GetExportName()
| gcc_pure const char* NfsConnection::GetExportName |
( |
| ) |
const |
|
inlinenoexcept |
◆ GetServer()
| gcc_pure const char* NfsConnection::GetServer |
( |
| ) |
const |
|
inlinenoexcept |
◆ OnNfsConnectionError()
| virtual void NfsConnection::OnNfsConnectionError |
( |
std::exception_ptr && |
e | ) |
|
|
protectedpure virtual |
◆ Open()
| void NfsConnection::Open |
( |
const char * |
path, |
|
|
int |
flags, |
|
|
NfsCallback & |
callback |
|
) |
| |
Throws std::runtime_error on error.
◆ OpenDirectory()
| void NfsConnection::OpenDirectory |
( |
const char * |
path, |
|
|
NfsCallback & |
callback |
|
) |
| |
◆ Read()
| void NfsConnection::Read |
( |
struct nfsfh * |
fh, |
|
|
uint64_t |
offset, |
|
|
size_t |
size, |
|
|
NfsCallback & |
callback |
|
) |
| |
Throws std::runtime_error on error.
◆ ReadDirectory()
| const struct nfsdirent* NfsConnection::ReadDirectory |
( |
struct nfsdir * |
dir | ) |
|
◆ RemoveLease()
| void NfsConnection::RemoveLease |
( |
NfsLease & |
lease | ) |
|
◆ Stat() [1/2]
| void NfsConnection::Stat |
( |
const char * |
path, |
|
|
NfsCallback & |
callback |
|
) |
| |
◆ Stat() [2/2]
| void NfsConnection::Stat |
( |
struct nfsfh * |
fh, |
|
|
NfsCallback & |
callback |
|
) |
| |
The documentation for this class was generated from the following file: