#include <XrdClLocalFileHandler.hh>
Public Member Functions | |
LocalFileHandler () | |
~LocalFileHandler () | |
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 | Close (ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | Stat (ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | Read (uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | Write (uint64_t offset, uint32_t size, const void *buffer, 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 | WriteV (uint64_t offset, ChunkList *chunks, ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | QueueTask (XRootDStatus *st, AnyObject *obj, ResponseHandler *handler) |
XRootDStatus | Fcntl (const Buffer &arg, ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | Visa (ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | SetXAttr (const std::vector< xattr_t > &attrs, ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | GetXAttr (const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | DelXAttr (const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0) |
XRootDStatus | ListXAttr (ResponseHandler *handler, uint16_t timeout=0) |
void | SetHostList (const HostList &hostList) |
const HostList & | GetHostList () |
XRootDStatus | ExecRequest (const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams) |
Translate an XRootD request into LocalFileHandler call. | |
Static Public Member Functions | |
static XRootDStatus | MkdirPath (const std::string &path) |
Private Member Functions | |
XRootDStatus | OpenImpl (const std::string &url, uint16_t flags, uint16_t mode, AnyObject *&resp) |
XRootDStatus | XAttrImpl (kXR_char code, kXR_char numattr, size_t bodylen, char *body, ResponseHandler *handler) |
Parses kXR_fattr request and calls respective XAttr operation. | |
Private Attributes | |
JobManager * | jmngr |
int | fd |
std::string | pUrl |
HostList | pHostList |
XrdCl::LocalFileHandler::LocalFileHandler | ( | ) |
XrdCl::LocalFileHandler::~LocalFileHandler | ( | ) |
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 |
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 |
XRootDStatus XrdCl::LocalFileHandler::ExecRequest | ( | const URL & | url, | |
Message * | msg, | |||
ResponseHandler * | handler, | |||
MessageSendParams & | sendParams | |||
) |
Translate an XRootD request into LocalFileHandler call.
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 |
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 |
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 |
static XRootDStatus XrdCl::LocalFileHandler::MkdirPath | ( | const std::string & | path | ) | [static] |
creates the directories specified in file_path
file_path | specifies which directories are to be created | |
mode | same access modes as for the desired file operation |
XRootDStatus XrdCl::LocalFileHandler::Open | ( | const URL * | url, | |
const Message * | req, | |||
AnyObject *& | resp | |||
) |
Handle local redirect to given URL triggered by the given request.
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 |
XRootDStatus XrdCl::LocalFileHandler::OpenImpl | ( | const std::string & | url, | |
uint16_t | flags, | |||
uint16_t | mode, | |||
AnyObject *& | resp | |||
) | [private] |
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 |
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 |
void XrdCl::LocalFileHandler::SetHostList | ( | const HostList & | hostList | ) | [inline] |
References pHostList.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 | |
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 |
XRootDStatus XrdCl::LocalFileHandler::XAttrImpl | ( | kXR_char | code, | |
kXR_char | numattr, | |||
size_t | bodylen, | |||
char * | body, | |||
ResponseHandler * | handler | |||
) | [private] |
Parses kXR_fattr request and calls respective XAttr operation.
int XrdCl::LocalFileHandler::fd [private] |
JobManager* XrdCl::LocalFileHandler::jmngr [private] |
HostList XrdCl::LocalFileHandler::pHostList [private] |
Referenced by GetHostList(), and SetHostList().
std::string XrdCl::LocalFileHandler::pUrl [private] |