XrdSfsXio Class Reference

#include <XrdSfsXio.hh>

Inheritance diagram for XrdSfsXio:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual XrdSfsXioHandle Claim (const char *curBuff, int datasz, int minasz)=0
virtual XrdSfsXioHandle Swap (const char *curBuff, XrdSfsXioHandle oldHand=0)=0
 XrdSfsXio (XrdSfsXioImpl &xioimpl)
virtual ~XrdSfsXio ()
 Constructor and destructor.

Static Public Member Functions

static char * Buffer (XrdSfsXioHandle theHand, int *buffsz=0)
static void Reclaim (XrdSfsXioHandle theHand)

Constructor & Destructor Documentation

XrdSfsXio::XrdSfsXio ( XrdSfsXioImpl xioimpl  ) 

Constructor and destructor

Parameters:
xioimpl Reference to static method implementations.
virtual XrdSfsXio::~XrdSfsXio (  )  [inline, virtual]

Constructor and destructor.


Member Function Documentation

static char* XrdSfsXio::Buffer ( XrdSfsXioHandle  theHand,
int *  buffsz = 0 
) [static]

Get the address and size of the buffer associated with a handle.

Parameters:
theHand - The handle associated with the buffer.
buffsz - If not nil, the size of the buffer is returned. The size will always be >= to the original data length.
Returns:
A pointer to the buffer.

Reimplemented in XrdXrootdProtocol.

virtual XrdSfsXioHandle XrdSfsXio::Claim ( const char *  curBuff,
int  datasz,
int  minasz 
) [pure virtual]

Claim ownership of the current buffer if it is memory effecient to do so.

Parameters:
curBuff - The address of the current buffer. It must match the the buffer that was most recently passed to the caller.
datasz - Number of useful bytes in the buffer (i.e. write size).
minasz - Minimum buffer size that would be allocated to copy data.
Returns:
!0 The buffer handle of the current buffer is returned along with ownership rights.
=0 Too much memory would be wasted by transferring ownership (errno == 0) or an error ocurred (errno != 0). When an error see Swap() below for possible types of errors.

Implemented in XrdXrootdProtocol.

static void XrdSfsXio::Reclaim ( XrdSfsXioHandle  theHand  )  [static]

Return a buffer previously gotten from a Claim() or Swap() call.

Parameters:
theHand - The handle associated with the buffer.

Reimplemented in XrdXrootdProtocol.

virtual XrdSfsXioHandle XrdSfsXio::Swap ( const char *  curBuff,
XrdSfsXioHandle  oldHand = 0 
) [pure virtual]

Swap the current I/O buffer

Parameters:
curBuff - The address of the current buffer. It must match the the buffer that was most recently passed to the caller.
oldHand - The handle associated with a buffer returned by a previous call to Swap(). A value of zero indicates that the caller is taking control of the buffer but has no replacement buffer.
Returns:
!0 The buffer handle of the current buffer is returned along with ownership rights. If oldHand was not nil, the caller's ownership of the associated buffer is reclaimed.
=0 An error occurred and nothing has changed; errno holds the reason for the error. Typically, EINVAL - curBuff doe not match current buffer. ENOBUFS - not enough memory to give up buffer. ENOTSUP - unsupported context for call.

Implemented in XrdXrootdProtocol.


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