#include <XrdOfsCPFile.hh>
|
static char * | Target (const char *ckpfn) |
|
◆ XrdOfsCPFile()
XrdOfsCPFile::XrdOfsCPFile |
( |
const char * |
cfn = 0 | ) |
|
Constructor
- Parameters
-
cfn | - Pointer to the name of the checkpoint file to use. When supplied, creates are prohibited. |
◆ ~XrdOfsCPFile()
XrdOfsCPFile::~XrdOfsCPFile |
( |
| ) |
|
◆ Append()
int XrdOfsCPFile::Append |
( |
const char * |
data, |
|
|
off_t |
offset, |
|
|
int |
dlen |
|
) |
| |
Append data to the checkpoint. Appends should be followed by Sync().
- Parameters
-
data | - Pointer to the data to be recorded. |
offset | - Offset in the source file where data came from. |
dlen | - Length of the data. |
- Returns
- 0 upon success and -errno upon failure.
◆ Create()
int XrdOfsCPFile::Create |
( |
const char * |
lfn, |
|
|
struct stat & |
Stat |
|
) |
| |
Create a checkpoint
- Parameters
-
lfn | - Pointer to the name of the source file being checkpointed. |
Stat | - Reference to source file stat information. |
- Returns
- 0 upon success and -errno upon failure.
◆ Destroy()
int XrdOfsCPFile::Destroy |
( |
| ) |
|
Destroy a checkpoint
- Returns
- 0 upon success and -errno upon failure.
◆ ErrState()
int XrdOfsCPFile::ErrState |
( |
| ) |
|
Place checkpoint file in error state.
- Returns
- 0 upon success and -errno upon failure.
◆ FName()
const char * XrdOfsCPFile::FName |
( |
bool |
trim = false | ) |
|
Get the checkpoint file name.
- Returns
- pointer to the checkpoint file name. The pointer will be "???" if there is no checkpoint file established.
◆ genCkpPath()
static char * XrdOfsCPFile::genCkpPath |
( |
| ) |
|
|
staticprivate |
◆ getSrcLfn()
static int XrdOfsCPFile::getSrcLfn |
( |
const char * |
cFN, |
|
|
rInfo & |
rinfo, |
|
|
int |
fd, |
|
|
int |
rc |
|
) |
| |
|
staticprivate |
◆ isActive()
bool XrdOfsCPFile::isActive |
( |
| ) |
|
|
inline |
Check if checpoint is established.
- Returns
- True if checkpoint has been established and false otherwise.
References ckpFN.
◆ Reserve()
bool XrdOfsCPFile::Reserve |
( |
int |
dlen, |
|
|
int |
nseg |
|
) |
| |
Reserve space for a subsequent checkpoint.
- Parameters
-
dlen | - the number of bytes that will be writen. |
nseg | - the number of segements that will be written. |
- Returns
- True upon success and false otherwise
◆ RestoreInfo()
int XrdOfsCPFile::RestoreInfo |
( |
rInfo & |
rinfo, |
|
|
const char *& |
ewhy |
|
) |
| |
◆ Sync()
int XrdOfsCPFile::Sync |
( |
| ) |
|
Commit data to media.
- Returns
- 0 upon success and -errno upon failure.
◆ Target()
static char * XrdOfsCPFile::Target |
( |
const char * |
ckpfn | ) |
|
|
static |
Get the name of the source file associated with a checkpoint file.
- Parameters
-
ckpfn | - Pointer to the name of the checkpoint file to use. |
- Returns
- pointer to either the source file name or reason it's not valid.
◆ Used()
int XrdOfsCPFile::Used |
( |
int |
nseg = 0 | ) |
|
Get the curent size of the checkpoint file.
- Parameters
-
nseg | - the number of future segments to account for. |
- Returns
- The size of the file in bytes.
◆ ckpDLen
int XrdOfsCPFile::ckpDLen |
|
private |
◆ ckpFD
◆ ckpFN
char* XrdOfsCPFile::ckpFN |
|
private |
◆ ckpSize
int XrdOfsCPFile::ckpSize |
|
private |
The documentation for this class was generated from the following file: