xrootd
Loading...
Searching...
No Matches
XrdOfsChkPnt.hh
Go to the documentation of this file.
1#ifndef __XRDOFSCHKPNT_HH__
2#define __XRDOFSCHKPNT_HH__
3/******************************************************************************/
4/* */
5/* X r d O f s C h k P n t . h h */
6/* */
7/* (c) 2020 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
35
36//-----------------------------------------------------------------------------
38//-----------------------------------------------------------------------------
39
40struct iov;
41class XrdOssDF;
42
44{
45public:
46
47//-----------------------------------------------------------------------------
51//-----------------------------------------------------------------------------
52
53 int Create();
54
55//-----------------------------------------------------------------------------
59//-----------------------------------------------------------------------------
60
61 int Delete();
62
63//-----------------------------------------------------------------------------
66//-----------------------------------------------------------------------------
67
68 void Finished() {delete this;}
69
70//-----------------------------------------------------------------------------
77//-----------------------------------------------------------------------------
78
79 int Query(struct iov &range);
80
81//-----------------------------------------------------------------------------
89//-----------------------------------------------------------------------------
90
91 int Restore(bool *readok=0);
92
93//-----------------------------------------------------------------------------
99//-----------------------------------------------------------------------------
100
101 int Truncate(struct iov *&range);
102
103//-----------------------------------------------------------------------------
110//-----------------------------------------------------------------------------
111
112 int Write(struct iov *&range, int rnum);
113
114//-----------------------------------------------------------------------------
120//-----------------------------------------------------------------------------
121
122 XrdOfsChkPnt(XrdOssDF &ossfl, const char *lfn, const char *ckpfn=0)
123 : lFN(lfn), cpFile(ckpfn), ossFile(ossfl), fSize(0),
124 cpUsed(0) {}
125
126virtual ~XrdOfsChkPnt() {}
127
128private:
129
130int Failed(const char *opn, int rc, bool *readok);
131
132const char *lFN;
135int64_t fSize;
137};
138#endif
Definition XrdOfsCPFile.hh:40
Definition XrdOfsChkPnt.hh:44
int Truncate(struct iov *&range)
XrdOfsCPFile cpFile
Definition XrdOfsChkPnt.hh:133
const char * lFN
Definition XrdOfsChkPnt.hh:132
int Failed(const char *opn, int rc, bool *readok)
XrdOfsChkPnt(XrdOssDF &ossfl, const char *lfn, const char *ckpfn=0)
Definition XrdOfsChkPnt.hh:122
XrdOssDF & ossFile
Definition XrdOfsChkPnt.hh:134
int Query(struct iov &range)
int Write(struct iov *&range, int rnum)
int64_t fSize
Definition XrdOfsChkPnt.hh:135
void Finished()
Definition XrdOfsChkPnt.hh:68
virtual ~XrdOfsChkPnt()
Definition XrdOfsChkPnt.hh:126
int cpUsed
Definition XrdOfsChkPnt.hh:136
int Restore(bool *readok=0)
Definition XrdOss.hh:63
Definition XrdOucChkPnt.hh:41
Definition XrdOucIOVec.hh:65