#include <XrdOfsCPFile.hh>
|
| static char * | Target (const char *ckpfn) |
| |
| 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 |
( |
| ) |
|
| 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.
| 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.
| int XrdOfsCPFile::Destroy |
( |
| ) |
|
Destroy a checkpoint
- Returns
- 0 upon success and -errno upon failure.
| int XrdOfsCPFile::ErrState |
( |
| ) |
|
Place checkpoint file in error state.
- Returns
- 0 upon success and -errno upon failure.
| 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.
| static char* XrdOfsCPFile::genCkpPath |
( |
| ) |
|
|
staticprivate |
| static int XrdOfsCPFile::getSrcLfn |
( |
const char * |
cFN, |
|
|
rInfo & |
rinfo, |
|
|
int |
fd, |
|
|
int |
rc |
|
) |
| |
|
staticprivate |
| bool XrdOfsCPFile::isActive |
( |
| ) |
|
|
inline |
Check if checpoint is established.
- Returns
- True if checkpoint has been established and false otherwise.
References ckpFN.
| 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
| int XrdOfsCPFile::RestoreInfo |
( |
rInfo & |
rinfo, |
|
|
const char *& |
ewhy |
|
) |
| |
| int XrdOfsCPFile::Sync |
( |
| ) |
|
Commit data to media.
- Returns
- 0 upon success and -errno upon failure.
| 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.
| 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.
| int XrdOfsCPFile::ckpDLen |
|
private |
| char* XrdOfsCPFile::ckpFN |
|
private |
| int XrdOfsCPFile::ckpSize |
|
private |
The documentation for this class was generated from the following file: