Arc::DataMover Class Reference

DataMover provides an interface to transfer data between two DataPoints. More...

#include <DataMover.h>

Public Member Functions

 DataMover ()
 ~DataMover ()
DataStatus Transfer (DataPoint &source, DataPoint &destination, FileCache &cache, const URLMap &map, callback cb=NULL, void *arg=NULL, const char *prefix=NULL)
DataStatus Transfer (DataPoint &source, DataPoint &destination, FileCache &cache, const URLMap &map, unsigned long long int min_speed, time_t min_speed_time, unsigned long long int min_average_speed, time_t max_inactivity_time, callback cb=NULL, void *arg=NULL, const char *prefix=NULL)
DataStatus Delete (DataPoint &url, bool errcont=false)
bool verbose ()
void verbose (bool)
void verbose (const std::string &prefix)
bool retry ()
void retry (bool)
void secure (bool)
void passive (bool)
void force_to_meta (bool)
bool checks ()
void checks (bool v)
void set_default_min_speed (unsigned long long int min_speed, time_t min_speed_time)
void set_default_min_average_speed (unsigned long long int min_average_speed)
void set_default_max_inactivity_time (time_t max_inactivity_time)
void set_progress_indicator (DataSpeed::show_progress_t func=NULL)
void set_preferred_pattern (const std::string &pattern)

Detailed Description

DataMover provides an interface to transfer data between two DataPoints.

Its main action is represented by Transfer methods


Member Function Documentation

void Arc::DataMover::checks ( bool  v  ) 

Set if to make check for existence of remote file (and probably other checks too) before initiating 'reading' and 'writing' operations.

Parameters:
v true if allowed (default is true).
bool Arc::DataMover::checks (  ) 

Check if check for existence of remote file is done before initiating 'reading' and 'writing' operations.

void Arc::DataMover::force_to_meta ( bool   ) 

Set if file should be transferred and registered even if such LFN is already registered and source is not one of registered locations.

void Arc::DataMover::secure ( bool   ) 

Set if high level of security (encryption) will be used during transfer if available.

void Arc::DataMover::set_default_max_inactivity_time ( time_t  max_inactivity_time  )  [inline]

Set maximal allowed time for waiting for any data. For more information see description of DataSpeed class.

void Arc::DataMover::set_default_min_average_speed ( unsigned long long int  min_average_speed  )  [inline]

Set minimal allowed average transfer speed (default is 0 averaged over whole time of transfer. For more information see description of DataSpeed class.

void Arc::DataMover::set_default_min_speed ( unsigned long long int  min_speed,
time_t  min_speed_time 
) [inline]

Set minimal allowed transfer speed (default is 0) to 'min_speed'. If speed drops below for time longer than 'min_speed_time' error is raised. For more information see description of DataSpeed class.

DataStatus Arc::DataMover::Transfer ( DataPoint source,
DataPoint destination,
FileCache cache,
const URLMap map,
unsigned long long int  min_speed,
time_t  min_speed_time,
unsigned long long int  min_average_speed,
time_t  max_inactivity_time,
callback  cb = NULL,
void *  arg = NULL,
const char *  prefix = NULL 
)

Initiates transfer from 'source' to 'destination'.

Parameters:
min_speed minimal allowed current speed.
min_speed_time time for which speed should be less than 'min_speed' before transfer fails.
min_average_speed minimal allowed average speed.
max_inactivity_time time for which should be no activity before transfer fails.
DataStatus Arc::DataMover::Transfer ( DataPoint source,
DataPoint destination,
FileCache cache,
const URLMap map,
callback  cb = NULL,
void *  arg = NULL,
const char *  prefix = NULL 
)

Initiates transfer from 'source' to 'destination'.

Parameters:
source source URL.
destination destination URL.
cache controls caching of downloaded files (if destination url is "file://"). If caching is not needed default constructor FileCache() can be used.
map URL mapping/conversion table (for 'source' URL).
cb if not NULL, transfer is done in separate thread and 'cb' is called after transfer completes/fails.
arg passed to 'cb'.
prefix if 'verbose' is activated this information will be printed before each line representing current transfer status.
void Arc::DataMover::verbose ( const std::string &  prefix  ) 

Activate printing information about transfer status.

Parameters:
prefix use this string if 'prefix' in DataMover::Transfer is NULL.

The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:57 2012 for ARC Data Library libarcdata by  doxygen 1.6.3