XrdCl::LocalFileHandler Class Reference

#include <XrdClLocalFileHandler.hh>

Collaboration diagram for XrdCl::LocalFileHandler:
Collaboration graph
[legend]

List of all members.

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 HostListGetHostList ()
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

JobManagerjmngr
int fd
std::string pUrl
HostList pHostList

Constructor & Destructor Documentation

XrdCl::LocalFileHandler::LocalFileHandler (  ) 
XrdCl::LocalFileHandler::~LocalFileHandler (  ) 

Member Function Documentation

XRootDStatus XrdCl::LocalFileHandler::Close ( ResponseHandler handler,
uint16_t  timeout = 0 
)

Close the file object

Parameters:
handler handler to be notified about the status of the operation
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::DelXAttr ( const std::vector< std::string > &  attrs,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Delete extended attributes - async

Parameters:
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
Returns:
: status of the operation
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

Parameters:
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
Returns:
status of the operation
const HostList& XrdCl::LocalFileHandler::GetHostList (  )  [inline]

References pHostList.

XRootDStatus XrdCl::LocalFileHandler::GetXAttr ( const std::vector< std::string > &  attrs,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Get extended attributes - async

Parameters:
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
Returns:
: status of the operation
XRootDStatus XrdCl::LocalFileHandler::ListXAttr ( ResponseHandler handler,
uint16_t  timeout = 0 
)

List extended attributes - async

Parameters:
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
Returns:
: status of the operation
static XRootDStatus XrdCl::LocalFileHandler::MkdirPath ( const std::string &  path  )  [static]

creates the directories specified in file_path

Parameters:
file_path specifies which directories are to be created
mode same access modes as for the desired file operation
Returns:
status of the mkdir system call
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

Parameters:
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
Returns:
status of the operation
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

Parameters:
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
Returns:
status of the operation
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

Parameters:
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
Returns:
status of the operation
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

Parameters:
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
Returns:
: status of the operation
XRootDStatus XrdCl::LocalFileHandler::Stat ( ResponseHandler handler,
uint16_t  timeout = 0 
)

Obtain status information for this file - async

Parameters:
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
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::Sync ( ResponseHandler handler,
uint16_t  timeout = 0 
)

Commit all pending disk writes - async

Parameters:
handler handler to be notified when the response arrives
timeout timeout value, if 0 the environment default will be used
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::Truncate ( uint64_t  size,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Truncate the file to a particular size - async

Parameters:
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
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::VectorRead ( const ChunkList chunks,
void *  buffer,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Read scattered data chunks in one operation - async

Parameters:
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
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::VectorWrite ( const ChunkList chunks,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Write scattered data chunks in one operation - async

Parameters:
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
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::Visa ( ResponseHandler handler,
uint16_t  timeout = 0 
)

Get access token to a file - async

Parameters:
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
Returns:
status of the operation
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

Parameters:
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
Returns:
status of the operation
XRootDStatus XrdCl::LocalFileHandler::WriteV ( uint64_t  offset,
ChunkList chunks,
ResponseHandler handler,
uint16_t  timeout = 0 
)

Write scattered buffers in one operation - async

Parameters:
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
Returns:
status of the operation
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.


Member Data Documentation

Referenced by GetHostList(), and SetHostList().

std::string XrdCl::LocalFileHandler::pUrl [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Jul 2020 for xrootd by  doxygen 1.6.1