XRootD
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
33
#include "
XrdOfs/XrdOfsCPFile.hh
"
34
#include "
XrdOuc/XrdOucChkPnt.hh
"
35
36
//-----------------------------------------------------------------------------
38
//-----------------------------------------------------------------------------
39
40
struct
iov
;
41
class
XrdOssDF
;
42
43
class
XrdOfsChkPnt
:
public
XrdOucChkPnt
44
{
45
public
:
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
126
virtual
~XrdOfsChkPnt
() {}
127
128
private
:
129
130
int
Failed(
const
char
*opn,
int
rc,
bool
*readok);
131
132
const
char
*lFN;
133
XrdOfsCPFile
cpFile;
134
XrdOssDF
&ossFile;
135
int64_t fSize;
136
int
cpUsed;
137
};
138
#endif
XrdOfsCPFile.hh
XrdOucChkPnt.hh
XrdOfsCPFile
Definition:
XrdOfsCPFile.hh:40
XrdOfsChkPnt
Definition:
XrdOfsChkPnt.hh:44
XrdOfsChkPnt::Create
int Create()
Definition:
XrdOfsChkPnt.cc:81
XrdOfsChkPnt::Delete
int Delete()
Definition:
XrdOfsChkPnt.cc:110
XrdOfsChkPnt::Truncate
int Truncate(struct iov *&range)
Definition:
XrdOfsChkPnt.cc:257
XrdOfsChkPnt::XrdOfsChkPnt
XrdOfsChkPnt(XrdOssDF &ossfl, const char *lfn, const char *ckpfn=0)
Definition:
XrdOfsChkPnt.hh:122
XrdOfsChkPnt::Query
int Query(struct iov &range)
Definition:
XrdOfsChkPnt.cc:169
XrdOfsChkPnt::Write
int Write(struct iov *&range, int rnum)
Definition:
XrdOfsChkPnt.cc:307
XrdOfsChkPnt::Finished
void Finished()
Definition:
XrdOfsChkPnt.hh:68
XrdOfsChkPnt::~XrdOfsChkPnt
virtual ~XrdOfsChkPnt()
Definition:
XrdOfsChkPnt.hh:126
XrdOfsChkPnt::Restore
int Restore(bool *readok=0)
Definition:
XrdOfsChkPnt.cc:180
XrdOssDF
Definition:
XrdOss.hh:63
XrdOucChkPnt
Definition:
XrdOucChkPnt.hh:41
iov
Definition:
XrdOucIOVec.hh:65
XrdOfs
XrdOfsChkPnt.hh
Generated by
1.9.1