3 #ifndef __ARC_DATAMOVER_H__ 4 #define __ARC_DATAMOVER_H__ 9 #include <arc/data/FileCache.h> 10 #include <arc/data/DataPoint.h> 11 #include <arc/data/DataSpeed.h> 12 #include <arc/data/DataStatus.h> 30 bool force_registration;
32 std::string verbose_prefix;
34 unsigned long long int default_min_speed;
35 time_t default_min_speed_time;
36 unsigned long long int default_min_average_speed;
37 time_t default_max_inactivity_time;
39 std::string preferred_pattern;
78 callback cb = NULL,
void *arg = NULL,
79 const char *prefix = NULL);
107 unsigned long long int min_speed,
108 time_t min_speed_time,
109 unsigned long long int min_average_speed,
110 time_t max_inactivity_time,
111 callback cb = NULL,
void *arg = NULL,
112 const char *prefix = NULL);
133 void verbose(
const std::string& prefix);
161 time_t min_speed_time) {
162 default_min_speed = min_speed;
163 default_min_speed_time = min_speed_time;
173 default_min_average_speed = min_average_speed;
182 default_max_inactivity_time = max_inactivity_time;
186 show_progress = func;
199 preferred_pattern = pattern;
205 #endif // __ARC_DATAMOVER_H__ Arc namespace contains all core ARC classes.
Definition: ArcConfig.h:11
void set_default_max_inactivity_time(time_t max_inactivity_time)
Set maximal allowed time for no data transfer.
Definition: DataMover.h:181
~DataMover()
Destructor cancels transfer if active and waits for cancellation to finish.
Status code returned by many DataPoint methods.
Definition: DataStatus.h:54
void passive(bool)
Set if passive transfer should be used for FTP-like transfers.
A logger class.
Definition: Logger.h:493
FileCache provides an interface to all cache operations.
Definition: FileCache.h:61
A DataPoint represents a data resource and is an abstraction of a URL.
Definition: DataPoint.h:121
DataStatus Delete(DataPoint &url, bool errcont=false)
Delete the file at url.
bool verbose()
Returns whether printing information about transfer status is activated.
void Cancel()
Cancel transfer, cleaning up any data written or registered.
DataMover provides an interface to transfer data between two DataPoints.
Definition: DataMover.h:25
void set_preferred_pattern(const std::string &pattern)
Set a preferred pattern for ordering of replicas.
Definition: DataMover.h:198
void set_default_min_speed(unsigned long long int min_speed, time_t min_speed_time)
Set minimal allowed transfer speed (default is 0) to 'min_speed'.
Definition: DataMover.h:160
void force_to_meta(bool)
Set if file should be transferred and registered even if such LFN is already registered and source is...
void secure(bool)
Set if high level of security (encryption) will be used during transfer if available.
URLMap allows mapping certain patterns of URLs to other URLs.
Definition: URLMap.h:22
void(* callback)(DataMover *mover, DataStatus status, void *arg)
Callback function which can be passed to Transfer().
Definition: DataMover.h:52
void(* show_progress_t)(FILE *o, const char *s, unsigned int t, unsigned long long int all, unsigned long long int max, double instant, double average)
Callback for output of transfer status.
Definition: DataSpeed.h:59
DataStatus 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'.
void set_progress_indicator(DataSpeed::show_progress_t func=NULL)
Set function which is called every second during the transfer.
Definition: DataMover.h:185
bool retry()
Returns whether transfer will be retried in case of failure.
void set_default_min_average_speed(unsigned long long int min_average_speed)
Set minimal allowed average transfer speed.
Definition: DataMover.h:172
DataMover()
Constructor. Sets all transfer parameters to default values.
bool checks()
Returns true if extra checks are made before transfer starts.