10 #ifndef ROOT_TXNetFile
11 #define ROOT_TXNetFile
55 class TXNetFile :
public TNetFile {
57 friend class TXNetSystem;
61 static Bool_t fgInitDone;
62 static Bool_t fgRootdBC;
63 static TFileStager *fgFileStager;
72 TXNetFile(
const TXNetFile&);
73 TXNetFile& operator=(
const TXNetFile&);
74 void CreateXClient(
const char *url, Option_t *option, Int_t netopt,
77 Int_t ParseOptions(
const char *opts, Int_t &cachesz, Int_t &readaheadsz,
78 Int_t &rmpolicy, Int_t &mxredir, Int_t &rastrategy, Int_t &readtrimblksz);
82 void SynchronizeCacheSize();
84 void Init(Bool_t create);
85 Bool_t Open(Option_t *option, Bool_t parallelopen);
86 Int_t SysStat(Int_t fd, Long_t *
id, Long64_t *size, Long_t *flags,
88 Int_t SysOpen(
const char *pathname, Int_t flags, UInt_t mode);
89 Int_t SysClose(Int_t fd);
92 static void FormUrl(TUrl uut, TString &uu);
93 static Int_t GetRootdProtocol(TSocket *s);
97 TXNetFile() : TNetFile(), fClient(0), fIsRootd(0), fInitMtx(0) {}
98 TXNetFile(
const char *url, Option_t *option =
"",
const char *fTitle =
"",
99 Int_t compress = 1, Int_t netopt = 0, Bool_t parallelopen = kFALSE,
100 const char *logicalurl = 0);
102 virtual ~TXNetFile();
104 virtual void Close(
const Option_t *opt =
"");
105 virtual void ResetCache();
106 virtual void Flush();
107 virtual Int_t GetBytesToPrefetch()
const;
108 virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len);
109 virtual TFile::EAsyncOpenStatus GetAsyncOpenStatus();
110 virtual Bool_t IsOpen()
const;
112 virtual void Print(Option_t *option=
"")
const;
113 virtual Bool_t ReadBuffer(
char *buf, Int_t len);
114 virtual Bool_t ReadBuffer(
char *buf, Long64_t pos, Int_t len);
115 virtual Bool_t ReadBuffers(
char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
116 virtual Int_t ReOpen(
const Option_t *mode);
117 virtual Bool_t WriteBuffer(
const char *buffer, Int_t BufferLength);
119 ClassDef(TXNetFile,0)