xrootd
XrdClFileStateHandler.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2011-2014 by European Organization for Nuclear Research (CERN)
3 // Author: Lukasz Janyst <ljanyst@cern.ch>
4 //------------------------------------------------------------------------------
5 // This file is part of the XRootD software suite.
6 //
7 // XRootD is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // XRootD is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19 //
20 // In applying this licence, CERN does not waive the privileges and immunities
21 // granted to it by virtue of its status as an Intergovernmental Organization
22 // or submit itself to any jurisdiction.
23 //------------------------------------------------------------------------------
24 
25 #ifndef __XRD_CL_FILE_STATE_HANDLER_HH__
26 #define __XRD_CL_FILE_STATE_HANDLER_HH__
27 
30 #include "XrdCl/XrdClFileSystem.hh"
33 #include "XrdCl/XrdClOptional.hh"
35 #include "XrdSys/XrdSysPthread.hh"
36 #include "XrdSys/XrdSysPageSize.hh"
37 
38 #include <list>
39 #include <set>
40 #include <vector>
41 
42 #include <sys/uio.h>
43 #include <cstdint>
44 
45 namespace
46 {
47  class PgReadHandler;
48  class PgReadRetryHandler;
49  class PgReadSubstitutionHandler;
50  class OpenHandler;
51 }
52 
53 namespace XrdCl
54 {
55  class ResponseHandlerHolder;
56  class Message;
57  class EcHandler;
58 
59  //----------------------------------------------------------------------------
61  //----------------------------------------------------------------------------
62  struct PgReadFlags
63  {
64  //------------------------------------------------------------------------
66  //------------------------------------------------------------------------
67  enum Flags
68  {
69  None = 0, //< Nothing
70  Retry = XrdProto::kXR_pgRetry //< Retry reading currupted page
71 
72  };
73  };
75 
76  //----------------------------------------------------------------------------
78  //----------------------------------------------------------------------------
80  {
81  friend class ::PgReadHandler;
82  friend class ::PgReadRetryHandler;
83  friend class ::PgReadSubstitutionHandler;
84  friend class ::OpenHandler;
85 
86  public:
87  //------------------------------------------------------------------------
89  //------------------------------------------------------------------------
91  {
97  CloseInProgress
98  };
99 
100  //------------------------------------------------------------------------
102  //------------------------------------------------------------------------
104 
105  //------------------------------------------------------------------------
110  //------------------------------------------------------------------------
111  FileStateHandler( bool useVirtRedirector, FilePlugIn *& plugin );
112 
113  //------------------------------------------------------------------------
115  //------------------------------------------------------------------------
117 
118  //------------------------------------------------------------------------
128  //------------------------------------------------------------------------
129  XRootDStatus Open( const std::string &url,
130  uint16_t flags,
131  uint16_t mode,
132  ResponseHandler *handler,
133  uint16_t timeout = 0 );
134 
135  //------------------------------------------------------------------------
142  //------------------------------------------------------------------------
144  uint16_t timeout = 0 );
145 
146  //------------------------------------------------------------------------
156  //------------------------------------------------------------------------
157  XRootDStatus Stat( bool force,
158  ResponseHandler *handler,
159  uint16_t timeout = 0 );
160 
161 
162  //------------------------------------------------------------------------
177  //------------------------------------------------------------------------
178  XRootDStatus Read( uint64_t offset,
179  uint32_t size,
180  void *buffer,
181  ResponseHandler *handler,
182  uint16_t timeout = 0 );
183 
184  //------------------------------------------------------------------------
197  //------------------------------------------------------------------------
198  XRootDStatus PgRead( uint64_t offset,
199  uint32_t size,
200  void *buffer,
201  ResponseHandler *handler,
202  uint16_t timeout = 0 );
203 
204  //------------------------------------------------------------------------
215  //------------------------------------------------------------------------
216  XRootDStatus PgReadRetry( uint64_t offset,
217  uint32_t size,
218  size_t pgnb,
219  void *buffer,
220  PgReadHandler *handler,
221  uint16_t timeout = 0 );
222 
223  //------------------------------------------------------------------------
237  //------------------------------------------------------------------------
238  XRootDStatus PgReadImpl( uint64_t offset,
239  uint32_t size,
240  void *buffer,
241  uint16_t flags,
242  ResponseHandler *handler,
243  uint16_t timeout = 0 );
244 
245  //------------------------------------------------------------------------
255  //------------------------------------------------------------------------
256  XRootDStatus Write( uint64_t offset,
257  uint32_t size,
258  const void *buffer,
259  ResponseHandler *handler,
260  uint16_t timeout = 0 );
261 
262  //------------------------------------------------------------------------
272  //------------------------------------------------------------------------
273  XRootDStatus Write( uint64_t offset,
274  Buffer &&buffer,
275  ResponseHandler *handler,
276  uint16_t timeout = 0 );
277 
278  //------------------------------------------------------------------------
291  //------------------------------------------------------------------------
292  XRootDStatus Write( uint64_t offset,
293  uint32_t size,
294  Optional<uint64_t> fdoff,
295  int fd,
296  ResponseHandler *handler,
297  uint16_t timeout = 0 );
298 
299  //------------------------------------------------------------------------
310  //------------------------------------------------------------------------
311  XRootDStatus PgWrite( uint64_t offset,
312  uint32_t size,
313  const void *buffer,
314  std::vector<uint32_t> &cksums,
315  ResponseHandler *handler,
316  uint16_t timeout = 0 );
317 
318  //------------------------------------------------------------------------
329  //------------------------------------------------------------------------
330  XRootDStatus PgWriteRetry( uint64_t offset,
331  uint32_t size,
332  const void *buffer,
333  uint32_t digest,
334  ResponseHandler *handler,
335  uint16_t timeout = 0 );
336 
337  //------------------------------------------------------------------------
349  //------------------------------------------------------------------------
350  XRootDStatus PgWriteImpl( uint64_t offset,
351  uint32_t size,
352  const void *buffer,
353  std::vector<uint32_t> &cksums,
354  kXR_char flags,
355  ResponseHandler *handler,
356  uint16_t timeout = 0 );
357 
358  //------------------------------------------------------------------------
365  //------------------------------------------------------------------------
367  uint16_t timeout = 0 );
368 
369  //------------------------------------------------------------------------
377  //------------------------------------------------------------------------
378  XRootDStatus Truncate( uint64_t size,
379  ResponseHandler *handler,
380  uint16_t timeout = 0 );
381 
382  //------------------------------------------------------------------------
391  //------------------------------------------------------------------------
393  void *buffer,
394  ResponseHandler *handler,
395  uint16_t timeout = 0 );
396 
397  //------------------------------------------------------------------------
405  //------------------------------------------------------------------------
407  ResponseHandler *handler,
408  uint16_t timeout = 0 );
409 
410  //------------------------------------------------------------------------
420  //------------------------------------------------------------------------
421  XRootDStatus WriteV( uint64_t offset,
422  const struct iovec *iov,
423  int iovcnt,
424  ResponseHandler *handler,
425  uint16_t timeout = 0 );
426 
427  //------------------------------------------------------------------------
437  //------------------------------------------------------------------------
438  XRootDStatus ReadV( uint64_t offset,
439  struct iovec *iov,
440  int iovcnt,
441  ResponseHandler *handler,
442  uint16_t timeout = 0 );
443 
444  //------------------------------------------------------------------------
455  //------------------------------------------------------------------------
456  XRootDStatus Fcntl( const Buffer &arg,
457  ResponseHandler *handler,
458  uint16_t timeout = 0 );
459 
460  //------------------------------------------------------------------------
469  //------------------------------------------------------------------------
471  uint16_t timeout = 0 );
472 
473  //------------------------------------------------------------------------
484  //------------------------------------------------------------------------
485  XRootDStatus SetXAttr( const std::vector<xattr_t> &attrs,
486  ResponseHandler *handler,
487  uint16_t timeout = 0 );
488 
489  //------------------------------------------------------------------------
500  //------------------------------------------------------------------------
501  XRootDStatus GetXAttr( const std::vector<std::string> &attrs,
502  ResponseHandler *handler,
503  uint16_t timeout = 0 );
504 
505  //------------------------------------------------------------------------
516  //------------------------------------------------------------------------
517  XRootDStatus DelXAttr( const std::vector<std::string> &attrs,
518  ResponseHandler *handler,
519  uint16_t timeout = 0 );
520 
521  //------------------------------------------------------------------------
531  //------------------------------------------------------------------------
533  uint16_t timeout = 0 );
534 
535  //------------------------------------------------------------------------
545  //------------------------------------------------------------------------
547  ResponseHandler *handler,
548  uint16_t timeout = 0 );
549 
550  //------------------------------------------------------------------------
560  //------------------------------------------------------------------------
561  XRootDStatus ChkptWrt( uint64_t offset,
562  uint32_t size,
563  const void *buffer,
564  ResponseHandler *handler,
565  uint16_t timeout = 0 );
566 
567  //------------------------------------------------------------------------
577  //------------------------------------------------------------------------
578  XRootDStatus ChkptWrtV( uint64_t offset,
579  const struct iovec *iov,
580  int iovcnt,
581  ResponseHandler *handler,
582  uint16_t timeout = 0 );
583 
584  //------------------------------------------------------------------------
586  //------------------------------------------------------------------------
587  void OnOpen( const XRootDStatus *status,
588  const OpenInfo *openInfo,
589  const HostList *hostList );
590 
591  //------------------------------------------------------------------------
593  //------------------------------------------------------------------------
594  void OnClose( const XRootDStatus *status );
595 
596  //------------------------------------------------------------------------
598  //------------------------------------------------------------------------
599  void OnStateError( XRootDStatus *status,
600  Message *message,
601  ResponseHandler *userHandler,
602  MessageSendParams &sendParams );
603 
604  //------------------------------------------------------------------------
606  //------------------------------------------------------------------------
607  void OnStateRedirection( const std::string &redirectUrl,
608  Message *message,
609  ResponseHandler *userHandler,
610  MessageSendParams &sendParams );
611 
612  //------------------------------------------------------------------------
614  //------------------------------------------------------------------------
616  Message *message,
617  AnyObject *response,
618  HostList *hostList );
619 
620  //------------------------------------------------------------------------
622  //------------------------------------------------------------------------
623  bool IsOpen() const;
624 
625  //------------------------------------------------------------------------
627  //------------------------------------------------------------------------
628  inline bool IsSecure() const
629  {
630  return pIsChannelEncrypted;
631  }
632 
633  //------------------------------------------------------------------------
637  //------------------------------------------------------------------------
638  bool SetProperty( const std::string &name, const std::string &value );
639 
640  //------------------------------------------------------------------------
644  //------------------------------------------------------------------------
645  bool GetProperty( const std::string &name, std::string &value ) const;
646 
647  //------------------------------------------------------------------------
649  //------------------------------------------------------------------------
650  void Lock()
651  {
652  pMutex.Lock();
653  }
654 
655  //------------------------------------------------------------------------
657  //------------------------------------------------------------------------
658  void UnLock()
659  {
660  pMutex.UnLock();
661  }
662 
663  //------------------------------------------------------------------------
665  //------------------------------------------------------------------------
666  void Tick( time_t now );
667 
668  //------------------------------------------------------------------------
670  //------------------------------------------------------------------------
671  void TimeOutRequests( time_t now );
672 
673  //------------------------------------------------------------------------
675  //------------------------------------------------------------------------
677 
678  //------------------------------------------------------------------------
680  //------------------------------------------------------------------------
681  XRootDStatus TryOtherServer( uint16_t timeout );
682 
683  private:
684  //------------------------------------------------------------------------
685  // Helper for queuing messages
686  //------------------------------------------------------------------------
687  struct RequestData
688  {
689  RequestData(): request(0), handler(0) {}
691  const MessageSendParams &p ):
692  request(r), handler(h), params(p) {}
696  };
697  typedef std::list<RequestData> RequestList;
698 
699  //------------------------------------------------------------------------
706  //------------------------------------------------------------------------
707  template<typename T>
709  kXR_char options,
710  const std::vector<T> &attrs,
711  ResponseHandler *handler,
712  uint16_t timeout = 0 );
713 
714  //------------------------------------------------------------------------
716  //------------------------------------------------------------------------
717  Status SendOrQueue( const URL &url,
718  Message *msg,
719  ResponseHandler *handler,
720  MessageSendParams &sendParams );
721 
722  //------------------------------------------------------------------------
724  //------------------------------------------------------------------------
725  bool IsRecoverable( const XRootDStatus &stataus ) const;
726 
727  //------------------------------------------------------------------------
733  //------------------------------------------------------------------------
734  Status RecoverMessage( RequestData rd, bool callbackOnFailure = true );
735 
736  //------------------------------------------------------------------------
738  //------------------------------------------------------------------------
740 
741  //------------------------------------------------------------------------
742  // Send a close and ignore the response
743  //------------------------------------------------------------------------
744  XRootDStatus SendClose( uint16_t timeout );
745 
746  //------------------------------------------------------------------------
748  //------------------------------------------------------------------------
749  bool IsReadOnly() const;
750 
751  //------------------------------------------------------------------------
753  //------------------------------------------------------------------------
754  XRootDStatus ReOpenFileAtServer( const URL &url, uint16_t timeout );
755 
756  //------------------------------------------------------------------------
758  //------------------------------------------------------------------------
760 
761  //------------------------------------------------------------------------
763  //------------------------------------------------------------------------
765 
766  //------------------------------------------------------------------------
768  //------------------------------------------------------------------------
770 
771  //------------------------------------------------------------------------
773  //------------------------------------------------------------------------
775 
776  //------------------------------------------------------------------------
778  //------------------------------------------------------------------------
780  {
781  pOpenTime.tv_sec = 0; pOpenTime.tv_usec = 0;
782  pRBytes = 0;
783  pVRBytes = 0;
784  pWBytes = 0;
785  pVSegs = 0;
786  pRCount = 0;
787  pVRCount = 0;
788  pWCount = 0;
789  pCloseReason = Status();
790  }
791 
792  //------------------------------------------------------------------------
794  //------------------------------------------------------------------------
795  void MonitorClose( const XRootDStatus *status );
796 
797  //------------------------------------------------------------------------
803  //------------------------------------------------------------------------
805  Message *msg,
806  ResponseHandler *handler,
807  MessageSendParams &sendParams );
808 
809  //------------------------------------------------------------------------
811  //------------------------------------------------------------------------
812  XRootDStatus WriteKernelBuffer( uint64_t offset,
813  uint32_t length,
814  std::unique_ptr<XrdSys::KernelBuffer> kbuff,
815  ResponseHandler *handler,
816  uint16_t timeout );
817 
827  uint8_t *pFileHandle;
828  uint16_t pOpenMode;
829  uint16_t pOpenFlags;
831  std::set<Message*> pInTheFly;
832  uint64_t pSessionId;
839 
840  //------------------------------------------------------------------------
841  // Monitoring variables
842  //------------------------------------------------------------------------
843  timeval pOpenTime;
844  uint64_t pRBytes;
845  uint64_t pVRBytes;
846  uint64_t pWBytes;
847  uint64_t pVWBytes;
848  uint64_t pVSegs;
849  uint64_t pRCount;
850  uint64_t pVRCount;
851  uint64_t pWCount;
852  uint64_t pVWCount;
854 
855  //------------------------------------------------------------------------
856  // Holds the OpenHanlder used to issue reopen
857  // (there is only only OpenHandler reopening a file at a time)
858  //------------------------------------------------------------------------
859  ResponseHandlerHolder *pReOpenHandler;
860 
861  //------------------------------------------------------------------------
862  // Responsible for file:// operations on the local filesystem
863  //------------------------------------------------------------------------
865 
866  //------------------------------------------------------------------------
867  // Responsible for Writing/Reading erasure-coded files
868  //------------------------------------------------------------------------
870  };
871 }
872 
873 #endif // __XRD_CL_FILE_STATE_HANDLER_HH__
unsigned char kXR_char
Definition: XPtypes.hh:65
#define XRDOUC_ENUM_OPERATORS(T)
Definition: XrdOucEnum.hh:22
Definition: XrdClAnyObject.hh:33
Binary blob representation.
Definition: XrdClBuffer.hh:34
An interface for file plug-ins.
Definition: XrdClPlugInInterface.hh:39
Handle the stateful operations.
Definition: XrdClFileStateHandler.hh:80
uint64_t pRBytes
Definition: XrdClFileStateHandler.hh:844
void OnStateRedirection(const std::string &redirectUrl, Message *message, ResponseHandler *userHandler, MessageSendParams &sendParams)
Handle stateful redirect.
Status SendOrQueue(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams)
Send a message to a host or put it in the recovery queue.
XRootDStatus VectorWrite(const ChunkList &chunks, ResponseHandler *handler, uint16_t timeout=0)
ResponseHandlerHolder * pReOpenHandler
Definition: XrdClFileStateHandler.hh:859
URL * pDataServer
Definition: XrdClFileStateHandler.hh:823
std::set< Message * > pInTheFly
Definition: XrdClFileStateHandler.hh:831
void AfterForkChild()
Called in the child process after the fork.
XRootDStatus SetXAttr(const std::vector< xattr_t > &attrs, ResponseHandler *handler, uint16_t timeout=0)
URL * pStateRedirect
Definition: XrdClFileStateHandler.hh:825
FileStateHandler(bool useVirtRedirector, FilePlugIn *&plugin)
XRootDStatus ReadV(uint64_t offset, struct iovec *iov, int iovcnt, ResponseHandler *handler, uint16_t timeout=0)
void TimeOutRequests(time_t now)
Declare timeout on requests being recovered.
XRootDStatus VectorRead(const ChunkList &chunks, void *buffer, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus PgRead(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus Stat(bool force, ResponseHandler *handler, uint16_t timeout=0)
void ReWriteFileHandle(Message *msg)
Re-write file handle.
bool pDoRecoverRead
Definition: XrdClFileStateHandler.hh:833
XRootDStatus Read(uint64_t offset, uint32_t size, void *buffer, ResponseHandler *handler, uint16_t timeout=0)
void Tick(time_t now)
Tick.
bool IsReadOnly() const
Check if the file is open for read only.
Status XAttrOperationImpl(kXR_char subcode, kXR_char options, const std::vector< T > &attrs, ResponseHandler *handler, uint16_t timeout=0)
bool pFollowRedirects
Definition: XrdClFileStateHandler.hh:835
XRootDStatus ChkptWrtV(uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, uint16_t timeout=0)
void FailQueuedMessages(XRootDStatus status)
Fail queued messages.
std::list< RequestData > RequestList
Definition: XrdClFileStateHandler.hh:697
XRootDStatus WriteV(uint64_t offset, const struct iovec *iov, int iovcnt, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus Checkpoint(kXR_char code, ResponseHandler *handler, uint16_t timeout=0)
bool pIsChannelEncrypted
Definition: XrdClFileStateHandler.hh:837
XRootDStatus Sync(ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus TryOtherServer(uint16_t timeout)
Try other data server.
XRootDStatus PgWrite(uint64_t offset, uint32_t size, const void *buffer, std::vector< uint32_t > &cksums, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus IssueRequest(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams)
XRootDStatus PgWriteImpl(uint64_t offset, uint32_t size, const void *buffer, std::vector< uint32_t > &cksums, kXR_char flags, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus DelXAttr(const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0)
uint64_t pVWBytes
Definition: XrdClFileStateHandler.hh:847
FileStateHandler(FilePlugIn *&plugin)
Constructor.
FilePlugIn *& pPlugin
Definition: XrdClFileStateHandler.hh:869
uint16_t pOpenFlags
Definition: XrdClFileStateHandler.hh:829
XrdSysMutex pMutex
Definition: XrdClFileStateHandler.hh:818
URL * pLoadBalancer
Definition: XrdClFileStateHandler.hh:824
XRootDStatus Write(uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, uint16_t timeout=0)
URL * pWrtRecoveryRedir
Definition: XrdClFileStateHandler.hh:826
XRootDStatus PgWriteRetry(uint64_t offset, uint32_t size, const void *buffer, uint32_t digest, ResponseHandler *handler, uint16_t timeout=0)
uint64_t pVSegs
Definition: XrdClFileStateHandler.hh:848
StatInfo * pStatInfo
Definition: XrdClFileStateHandler.hh:821
FileStatus
State of the file.
Definition: XrdClFileStateHandler.hh:91
@ OpenInProgress
Opening is in progress.
Definition: XrdClFileStateHandler.hh:96
@ Closed
The file is closed.
Definition: XrdClFileStateHandler.hh:92
@ Opened
Opening has succeeded.
Definition: XrdClFileStateHandler.hh:93
@ Error
Opening has failed.
Definition: XrdClFileStateHandler.hh:94
@ Recovering
Recovering from an error.
Definition: XrdClFileStateHandler.hh:95
void UnLock()
Unlock the internal lock.
Definition: XrdClFileStateHandler.hh:658
XRootDStatus Write(uint64_t offset, uint32_t size, Optional< uint64_t > fdoff, int fd, ResponseHandler *handler, uint16_t timeout=0)
RequestList pToBeRecovered
Definition: XrdClFileStateHandler.hh:830
void ResetMonitoringVars()
Reset monitoring vars.
Definition: XrdClFileStateHandler.hh:779
XRootDStatus pCloseReason
Definition: XrdClFileStateHandler.hh:853
uint64_t pVWCount
Definition: XrdClFileStateHandler.hh:852
XRootDStatus Truncate(uint64_t size, ResponseHandler *handler, uint16_t timeout=0)
uint64_t pVRBytes
Definition: XrdClFileStateHandler.hh:845
uint64_t pSessionId
Definition: XrdClFileStateHandler.hh:832
bool SetProperty(const std::string &name, const std::string &value)
bool pAllowBundledClose
Definition: XrdClFileStateHandler.hh:838
XRootDStatus SendClose(uint16_t timeout)
XRootDStatus GetXAttr(const std::vector< std::string > &attrs, ResponseHandler *handler, uint16_t timeout=0)
Status RunRecovery()
Run the recovery procedure if appropriate.
void OnClose(const XRootDStatus *status)
Process the results of the closing operation.
void OnStateError(XRootDStatus *status, Message *message, ResponseHandler *userHandler, MessageSendParams &sendParams)
Handle an error while sending a stateful message.
XRootDStatus Visa(ResponseHandler *handler, uint16_t timeout=0)
void OnStateResponse(XRootDStatus *status, Message *message, AnyObject *response, HostList *hostList)
Handle stateful response.
uint16_t pOpenMode
Definition: XrdClFileStateHandler.hh:828
XRootDStatus Write(uint64_t offset, Buffer &&buffer, ResponseHandler *handler, uint16_t timeout=0)
uint8_t * pFileHandle
Definition: XrdClFileStateHandler.hh:827
XRootDStatus ListXAttr(ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus Fcntl(const Buffer &arg, ResponseHandler *handler, uint16_t timeout=0)
void OnOpen(const XRootDStatus *status, const OpenInfo *openInfo, const HostList *hostList)
Process the results of the opening operation.
XRootDStatus PgReadImpl(uint64_t offset, uint32_t size, void *buffer, uint16_t flags, ResponseHandler *handler, uint16_t timeout=0)
XRootDStatus WriteKernelBuffer(uint64_t offset, uint32_t length, std::unique_ptr< XrdSys::KernelBuffer > kbuff, ResponseHandler *handler, uint16_t timeout)
Send a write request with payload being stored in a kernel buffer.
XRootDStatus ChkptWrt(uint64_t offset, uint32_t size, const void *buffer, ResponseHandler *handler, uint16_t timeout=0)
uint64_t pRCount
Definition: XrdClFileStateHandler.hh:849
void MonitorClose(const XRootDStatus *status)
Dispatch monitoring information on close.
Status RecoverMessage(RequestData rd, bool callbackOnFailure=true)
bool pDoRecoverWrite
Definition: XrdClFileStateHandler.hh:834
bool IsRecoverable(const XRootDStatus &stataus) const
Check if the stateful error is recoverable.
uint64_t pVRCount
Definition: XrdClFileStateHandler.hh:850
XRootDStatus Close(ResponseHandler *handler, uint16_t timeout=0)
uint64_t pWBytes
Definition: XrdClFileStateHandler.hh:846
XRootDStatus pStatus
Definition: XrdClFileStateHandler.hh:820
XRootDStatus Open(const std::string &url, uint16_t flags, uint16_t mode, ResponseHandler *handler, uint16_t timeout=0)
bool IsSecure() const
Check if the file is using an encrypted connection.
Definition: XrdClFileStateHandler.hh:628
void FailMessage(RequestData rd, XRootDStatus status)
Fail a message.
~FileStateHandler()
Destructor.
bool GetProperty(const std::string &name, std::string &value) const
LocalFileHandler * pLFileHandler
Definition: XrdClFileStateHandler.hh:864
uint64_t pWCount
Definition: XrdClFileStateHandler.hh:851
XRootDStatus PgReadRetry(uint64_t offset, uint32_t size, size_t pgnb, void *buffer, PgReadHandler *handler, uint16_t timeout=0)
FileStatus pFileState
Definition: XrdClFileStateHandler.hh:819
bool pUseVirtRedirector
Definition: XrdClFileStateHandler.hh:836
timeval pOpenTime
Definition: XrdClFileStateHandler.hh:843
bool IsOpen() const
Check if the file is open.
XRootDStatus ReOpenFileAtServer(const URL &url, uint16_t timeout)
Re-open the current file at a given server.
void ReSendQueuedMessages()
Re-send queued messages.
void Lock()
Lock the internal lock.
Definition: XrdClFileStateHandler.hh:650
URL * pFileUrl
Definition: XrdClFileStateHandler.hh:822
Definition: XrdClLocalFileHandler.hh:33
The message representation used throughout the system.
Definition: XrdClMessage.hh:30
Information returned by file open operation.
Definition: XrdClXRootDResponses.hh:853
Definition: XrdClOptional.hh:44
Handle an async response.
Definition: XrdClXRootDResponses.hh:1117
Object stat info.
Definition: XrdClXRootDResponses.hh:400
URL representation.
Definition: XrdClURL.hh:31
Request status.
Definition: XrdClXRootDResponses.hh:219
Definition: XrdSysPthread.hh:165
Definition: XrdClAnyObject.hh:26
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:1111
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition: XrdClXRootDResponses.hh:1046
static const int kXR_pgRetry
Definition: XProtocol.hh:498
Definition: XrdClFileStateHandler.hh:688
RequestData()
Definition: XrdClFileStateHandler.hh:689
Message * request
Definition: XrdClFileStateHandler.hh:693
RequestData(Message *r, ResponseHandler *h, const MessageSendParams &p)
Definition: XrdClFileStateHandler.hh:690
ResponseHandler * handler
Definition: XrdClFileStateHandler.hh:694
MessageSendParams params
Definition: XrdClFileStateHandler.hh:695
Definition: XrdClMessageUtils.hh:132
none object for initializing empty Optional
Definition: XrdClOptional.hh:35
PgRead flags.
Definition: XrdClFileStateHandler.hh:63
Flags
PgRead flags.
Definition: XrdClFileStateHandler.hh:68
@ Retry
Definition: XrdClFileStateHandler.hh:70
Procedure execution status.
Definition: XrdClStatus.hh:114
Definition: XrdOucIOVec.hh:65