|
XRootD
|
#include <XrdClLocalFileHandler.hh>
Collaboration diagram for XrdCl::LocalFileHandler:Public Member Functions | |
| LocalFileHandler () | |
| ~LocalFileHandler () | |
| XRootDStatus | Close (ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | DelXAttr (const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | ExecRequest (const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams) |
| Translate an XRootD request into LocalFileHandler call. | |
| XRootDStatus | Fcntl (const Buffer &arg, ResponseHandler *handler, uint16_t timeout=0) |
| const HostList & | GetHostList () |
| XRootDStatus | GetXAttr (const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | ListXAttr (ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Open (const std::string &url, uint16_t flags, uint16_t mode, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Open (const URL *url, const Message *req, AnyObject *&resp) |
| Handle local redirect to given URL triggered by the given request. | |
| XRootDStatus | QueueTask (XRootDStatus *st, AnyObject *obj, ResponseHandler *handler) |
| XRootDStatus | Read (uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | ReadV (uint64_t offset, struct iovec *iov, int iovcnt, ResponseHandler *handler, uint16_t timeout=0) |
| void | SetHostList (const HostList &hostList) |
| XRootDStatus | SetXAttr (const std::vector< xattr_t > &attrs, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Stat (ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Sync (ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Truncate (uint64_t size, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | VectorRead (const ChunkList &chunks, void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | VectorWrite (const ChunkList &chunks, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Visa (ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | Write (uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
| XRootDStatus | WriteV (uint64_t offset, ChunkList *chunks, ResponseHandler *handler, uint16_t timeout=0) |
Static Public Member Functions | |
| static XRootDStatus | MkdirPath (const std::string &path) |
Definition at line 32 of file XrdClLocalFileHandler.hh.
| XrdCl::LocalFileHandler::LocalFileHandler | ( | ) |
Definition at line 230 of file XrdClLocalFileHandler.cc.
| XrdCl::LocalFileHandler::~LocalFileHandler | ( | ) |
Definition at line 238 of file XrdClLocalFileHandler.cc.
| XRootDStatus XrdCl::LocalFileHandler::Close | ( | ResponseHandler * | handler, |
| uint16_t | timeout = 0 ) |
Close the file object
| handler | handler to be notified about the status of the operation |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 269 of file XrdClLocalFileHandler.cc.
References close, XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::DefaultEnv::GetLog(), QueueTask(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::DelXAttr | ( | const std::vector< std::string > & | attrs, |
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Delete extended attributes - async
| attrs | : list of extended attributes to set |
| handler | : handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttrStatus objects |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 696 of file XrdClLocalFileHandler.cc.
References XrdSysXAttr::Del(), XrdCl::errLocalError, QueueTask(), XrdCl::AnyObject::Set(), XrdCl::stError, and XrdSysFAttr::Xat.
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::ExecRequest | ( | const URL & | url, |
| Message * | msg, | ||
| ResponseHandler * | handler, | ||
| MessageSendParams & | sendParams ) |
Translate an XRootD request into LocalFileHandler call.
Definition at line 1003 of file XrdClLocalFileHandler.cc.
References XrdCl::MessageSendParams::chunkList, Close(), ClientFattrRequest::dlen, ClientWriteRequest::dlen, XrdCl::errNotSupported, ClientRequest::fattr, XrdCl::Buffer::GetBuffer(), XrdCl::URL::GetURL(), XrdCl::Message::GetVirtReqID(), ClientRequest::header, kXR_close, kXR_fattr, kXR_open, kXR_read, kXR_readv, kXR_stat, kXR_sync, kXR_truncate, kXR_virtReadv, kXR_write, kXR_writev, ClientOpenRequest::mode, ClientFattrRequest::numattr, ClientReadRequest::offset, ClientTruncateRequest::offset, ClientWriteRequest::offset, Open(), ClientRequest::open, ClientOpenRequest::options, Read(), ClientRequest::read, ReadV(), ClientRequestHdr::requestid, ClientReadRequest::rlen, XrdOucIOVec::size, Stat, XrdCl::stError, ClientFattrRequest::subcode, Sync(), XrdCl::MessageSendParams::timeout, Truncate(), ClientRequest::truncate, VectorRead(), VectorWrite(), Write(), ClientRequest::write, and WriteV().
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Fcntl | ( | const Buffer & | arg, |
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Performs a custom operation on an open file - async
| arg | query argument |
| handler | handler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 607 of file XrdClLocalFileHandler.cc.
References XrdCl::errNotSupported, and XrdCl::stError.
|
inline |
Definition at line 306 of file XrdClLocalFileHandler.hh.
| XRootDStatus XrdCl::LocalFileHandler::GetXAttr | ( | const std::vector< std::string > & | attrs, |
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Get extended attributes - async
| attrs | : list of extended attributes to get |
| handler | : handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttr objects |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 653 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdSysXAttr::Get(), XrdCl::NullRef< Response >::value, QueueTask(), XrdCl::AnyObject::Set(), XrdCl::stError, and XrdSysFAttr::Xat.
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::ListXAttr | ( | ResponseHandler * | handler, |
| uint16_t | timeout = 0 ) |
List extended attributes - async
| handler | : handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttr objects |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 723 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdSysXAttr::Free(), XrdSysXAttr::Get(), XrdSysXAttr::List(), XProtocol::mapError(), XrdSysXAttr::AList::Name, XrdSysXAttr::AList::Next, XrdSysXAttr::AList::Nlen, XrdCl::NullRef< Response >::value, QueueTask(), XrdCl::AnyObject::Set(), XrdCl::stError, XrdSysXAttr::AList::Vlen, and XrdSysFAttr::Xat.
Here is the call graph for this function:
|
static |
creates the directories specified in path
| path | specifies which directories are to be created |
Definition at line 791 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, lstat(), mkdir, stat, and XrdCl::stError.
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Open | ( | const std::string & | url, |
| uint16_t | flags, | ||
| uint16_t | mode, | ||
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Open the file pointed to by the given URL
| url | url of the file to be opened |
| flags | OpenFlags::Flags |
| mode | Access::Mode for new files, 0 otherwise |
| handler | handler to be notified about the status of the operation |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 246 of file XrdClLocalFileHandler.cc.
References XrdCl::Status::code, XrdCl::errLocalError, XrdCl::Status::IsOK(), and QueueTask().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Open | ( | const URL * | url, |
| const Message * | req, | ||
| AnyObject *& | resp ) |
Handle local redirect to given URL triggered by the given request.
Definition at line 257 of file XrdClLocalFileHandler.cc.
References XrdCl::Buffer::GetBuffer(), XrdCl::URL::GetURL(), ClientOpenRequest::mode, and ClientOpenRequest::options.
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::QueueTask | ( | XRootDStatus * | st, |
| AnyObject * | obj, | ||
| ResponseHandler * | handler ) |
Queues a task to the jobmanager
| st | the status of the file operation |
| obj | the object holding data like open-, chunk- or vreadinfo |
| handler | handler to be notified when the response arrives |
Definition at line 768 of file XrdClLocalFileHandler.cc.
References XrdCl::PostMaster::GetJobManager(), XrdCl::DefaultEnv::GetPostMaster(), XrdCl::SyncResponseHandler::HandleResponse(), and XrdCl::JobManager::QueueJob().
Referenced by Close(), DelXAttr(), GetXAttr(), ListXAttr(), Open(), Read(), ReadV(), SetXAttr(), Stat(), Sync(), Truncate(), VectorRead(), VectorWrite(), Write(), and WriteV().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Read | ( | uint64_t | offset, |
| uint32_t | size, | ||
| void * | buffer, | ||
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Read a data chunk at a given offset - sync
| offset | offset from the beginning of the file |
| size | number of bytes to be read |
| buffer | a pointer to a buffer big enough to hold the data or 0 if the buffer should be allocated by the system |
| handler | handler to be notified when the response arrives, the response parameter will hold a buffer object if the procedure was successful, if a preallocated buffer was specified then the buffer object will "wrap" this buffer |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 320 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::DefaultEnv::GetLog(), pread, QueueTask(), read, XrdCl::AnyObject::Set(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::ReadV | ( | uint64_t | offset, |
| struct iovec * | iov, | ||
| int | iovcnt, | ||
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Read data into scattered buffers in one operation - async
| offset | offset from the beginning of the file |
| iov | list of the buffers to be written |
| iovcnt | number of buffers |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 357 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::VectorReadInfo::GetChunks(), XrdCl::DefaultEnv::GetLog(), lseek, QueueTask(), readv, XrdCl::AnyObject::Set(), XrdCl::VectorReadInfo::SetSize(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 301 of file XrdClLocalFileHandler.hh.
| XRootDStatus XrdCl::LocalFileHandler::SetXAttr | ( | const std::vector< xattr_t > & | attrs, |
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Set extended attributes - async
| attrs | : list of extended attributes to set |
| handler | : handler to be notified when the response arrives, the response parameter will hold a std::vector of XAttrStatus objects |
| timeout | : timeout value, if 0 the environment default will be used |
Definition at line 625 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::NullRef< Response >::value, QueueTask(), XrdCl::AnyObject::Set(), XrdSysXAttr::Set(), XrdCl::stError, and XrdSysFAttr::Xat.
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Stat | ( | ResponseHandler * | handler, |
| uint16_t | timeout = 0 ) |
Obtain status information for this file - async
| handler | handler to be notified when the response arrives, the response parameter will hold a StatInfo object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 286 of file XrdClLocalFileHandler.cc.
References XrdCl::Log::Debug(), XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, fstat, XrdCl::DefaultEnv::GetLog(), kXR_FSError, XrdCl::StatInfo::ParseServerResponse(), QueueTask(), XrdCl::AnyObject::Set(), stat, XrdCl::stError, and XrdSysE2T().
Here is the call graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Sync | ( | ResponseHandler * | handler, |
| uint16_t | timeout = 0 ) |
Commit all pending disk writes - async
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 438 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::errOSError, XrdCl::FileMsg, fsync, XrdCl::DefaultEnv::GetLog(), XProtocol::mapError(), QueueTask(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Truncate | ( | uint64_t | size, |
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Truncate the file to a particular size - async
| size | desired size of the file |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 469 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, ftruncate, XrdCl::DefaultEnv::GetLog(), QueueTask(), XrdCl::stError, XrdCl::stOK, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::VectorRead | ( | const ChunkList & | chunks, |
| void * | buffer, | ||
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Read scattered data chunks in one operation - async
| chunks | list of the chunks to be read |
| buffer | a pointer to a buffer big enough to hold the data |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 487 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::DefaultEnv::GetLog(), pread, QueueTask(), XrdCl::AnyObject::Set(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::VectorWrite | ( | const ChunkList & | chunks, |
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Write scattered data chunks in one operation - async
| chunks | list of the chunks to be read |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 524 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::DefaultEnv::GetLog(), pwrite, QueueTask(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::Visa | ( | ResponseHandler * | handler, |
| uint16_t | timeout = 0 ) |
Get access token to a file - async
| handler | handler to be notified when the response arrives, the response parameter will hold a Buffer object if the procedure is successful |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 616 of file XrdClLocalFileHandler.cc.
References XrdCl::errNotSupported, and XrdCl::stError.
| XRootDStatus XrdCl::LocalFileHandler::Write | ( | uint64_t | offset, |
| uint32_t | size, | ||
| const void * | buffer, | ||
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Write a data chunk at a given offset - async
| offset | offset from the beginning of the file |
| size | number of bytes to be written |
| buffer | a pointer to the buffer holding the data to be written |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 the environment default will be used |
Definition at line 397 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::DefaultEnv::GetLog(), pwrite, QueueTask(), XrdCl::stError, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function:| XRootDStatus XrdCl::LocalFileHandler::WriteV | ( | uint64_t | offset, |
| ChunkList * | chunks, | ||
| ResponseHandler * | handler, | ||
| uint16_t | timeout = 0 ) |
Write scattered buffers in one operation - async
| offset | offset from the beginning of the file |
| chunks | list of the chunks to be read |
| handler | handler to be notified when the response arrives |
| timeout | timeout value, if 0 then the environment default will be used |
Definition at line 549 of file XrdClLocalFileHandler.cc.
References XrdCl::errLocalError, XrdCl::Log::Error(), XrdCl::FileMsg, XrdCl::DefaultEnv::GetLog(), lseek, QueueTask(), XrdCl::stError, writev, and XrdSysE2T().
Referenced by ExecRequest().
Here is the call graph for this function:
Here is the caller graph for this function: