3 #ifndef __ARC_DTRSTATUS_H__ 4 #define __ARC_DTRSTATUS_H__ 137 : status(status), desc(desc) {}
140 : status(
NEW), desc (
"") {}
148 return status == s.status;
158 return status != s.status;
168 std::string
str()
const;
275 const std::string& desc =
""):
276 error_status(status),
277 last_error_state(error_state),
278 error_location(location),
300 return error_location;
310 return error_status == s;
314 return error_status == s.error_status;
319 return error_status != s;
323 return error_status != s.error_status;
static const std::vector< DTRStatus::DTRStatusType > ProcessingStates
Vector of states with a processing action, eg CHECKING_CACHE.
Definition: DTRStatus.h:189
DTRStatusType
Possible state values.
Definition: DTRStatus.h:21
Error occurred in an unknown location.
Definition: DTRStatus.h:262
Replica was queried.
Definition: DTRStatus.h:56
No error.
Definition: DTRStatus.h:216
DTRErrorStatusType GetErrorStatus() const
Returns the error type.
Definition: DTRStatus.h:289
Releasing locks and copying/linking cache files to the session dir.
Definition: DTRStatus.h:113
DTRStatus & operator=(const DTRStatusType &s)
Make a new DTRStatus with the same status as the given DTRStatusType.
Definition: DTRStatus.h:162
Prepare or stage the source and/or destination.
Definition: DTRStatus.h:68
Internal error in Data Staging logic.
Definition: DTRStatus.h:219
Making a staging or preparing request.
Definition: DTRStatus.h:71
Release of staging/preparing request completed.
Definition: DTRStatus.h:98
Cancellation request fulfilled but DTR also completed transfer successfully.
Definition: DTRStatus.h:125
DTRStatus(const DTRStatusType &status, std::string desc="")
Make new DTRStatus with given status and optional description.
Definition: DTRStatus.h:136
Cache file is locked, waiting for its release.
Definition: DTRStatus.h:35
Replica registration completed.
Definition: DTRStatus.h:107
Resolve a meta-protocol.
Definition: DTRStatus.h:41
bool operator==(const DTRStatus &s) const
Returns true if this status is the same as the given DTRStatus.
Definition: DTRStatus.h:147
DTRStatusType GetStatus() const
Get the DTRStatusType of the current state.
Definition: DTRStatus.h:181
static const std::vector< DTRStatus::DTRStatusType > ToProcessStates
Vector of states with a to be processed action, eg CHECK_CACHE.
Definition: DTRStatus.h:187
Staging/preparing request completed.
Definition: DTRStatus.h:77
bool operator==(const DTRStatusType &s) const
Returns true if this status is the same as the given DTRStatusType.
Definition: DTRStatus.h:143
Transfer rate was too slow.
Definition: DTRStatus.h:240
Error with local file.
Definition: DTRStatus.h:237
Permanent error with cache.
Definition: DTRStatus.h:228
bool operator==(const DTRErrorStatus &s) const
Returns true if this error status is the same as the given DTRErrorStatus.
Definition: DTRStatus.h:313
Waited for too long to become staging.
Definition: DTRStatus.h:243
Cache processing completed.
Definition: DTRStatus.h:116
Class representing the status of a DTR.
Definition: DTRStatus.h:16
Just created.
Definition: DTRStatus.h:26
Releasing staging/preparing request.
Definition: DTRStatus.h:95
DTRErrorStatusType
A list of error types.
Definition: DTRStatus.h:213
DataStaging contains all components for data transfer scheduling and execution.
Definition: DataDelivery.h:12
bool operator!=(const DTRErrorStatusType &s) const
Returns true if this error status is not the same as the given DTRErrorStatusType.
Definition: DTRStatus.h:318
"Stateless" DTR
Definition: DTRStatus.h:131
Permanent error with remote service.
Definition: DTRStatus.h:234
bool operator!=(const DTRErrorStatus &s) const
Returns true if this error status is not the same as the given DTRErrorStatus.
Definition: DTRStatus.h:322
Wait for the status of the staging/preparing request.
Definition: DTRStatus.h:74
static const std::vector< DTRStatus::DTRStatusType > StagedStates
Vector of states where a DTR is staged - used to limit the number of staged files.
Definition: DTRStatus.h:192
Temporary error with remote service.
Definition: DTRStatus.h:231
void SetDesc(const std::string &d)
Set the detailed description of the current state.
Definition: DTRStatus.h:171
No error.
Definition: DTRStatus.h:250
std::string GetDesc() const
Returns the error description.
Definition: DTRStatus.h:304
std::string GetDesc() const
Get the detailed description of the current state.
Definition: DTRStatus.h:176
DTRErrorStatus(DTRErrorStatusType status, DTRStatus::DTRStatusType error_state, DTRErrorLocation location, const std::string &desc="")
Create a new DTRErrorStatus with given error states.
Definition: DTRStatus.h:272
Internal processing error, like losing contact with external process.
Definition: DTRStatus.h:222
Destination is cacheable, process cache.
Definition: DTRStatus.h:110
Query a replica.
Definition: DTRStatus.h:50
The destination file has been deleted.
Definition: DTRStatus.h:65
Error with source.
Definition: DTRStatus.h:253
Transfer ready and can be started.
Definition: DTRStatus.h:80
std::string str() const
Returns a string representation of the current state.
The destination should be deleted.
Definition: DTRStatus.h:59
DTRErrorStatus()
Create a new DTRErrorStatus with default none/null error states.
Definition: DTRStatus.h:282
bool operator==(const DTRErrorStatusType &s) const
Returns true if this error status is the same as the given DTRErrorStatusType.
Definition: DTRStatus.h:309
Register a new replica of the destination.
Definition: DTRStatus.h:101
DTRErrorStatus & operator=(const DTRErrorStatusType &s)
Make a new DTRErrorStatus with the same error status as the given DTRErrorStatusType.
Definition: DTRStatus.h:327
Error with destination.
Definition: DTRStatus.h:256
DTRStatus::DTRStatusType GetLastErrorState() const
Returns the state in which the error occurred.
Definition: DTRStatus.h:294
Transfer is on-going but scheduled for cancellation.
Definition: DTRStatus.h:86
Cache check completed.
Definition: DTRStatus.h:38
Check the cache for the file may be already there.
Definition: DTRStatus.h:29
Deleting the destination.
Definition: DTRStatus.h:62
A class to represent error states reported by various components.
Definition: DTRStatus.h:208
bool operator!=(const DTRStatusType &s) const
Returns true if this status is not the same as the given DTRStatusType.
Definition: DTRStatus.h:153
Checking the cache.
Definition: DTRStatus.h:32
Transfer finished, release requests on the storage.
Definition: DTRStatus.h:92
Everything completed successfully.
Definition: DTRStatus.h:119
Registering a replica in an index service.
Definition: DTRStatus.h:104
Replica resolution completed.
Definition: DTRStatus.h:47
bool operator!=(const DTRStatus &s) const
Returns true if this status is not the same as the given DTRStatus.
Definition: DTRStatus.h:157
Attempt to replicate a file to itself.
Definition: DTRStatus.h:225
Cancellation request fulfilled successfully.
Definition: DTRStatus.h:122
Error occured.
Definition: DTRStatus.h:128
DTRErrorLocation
Describes where the error occurred.
Definition: DTRStatus.h:247
Resolving replicas.
Definition: DTRStatus.h:44
Transfer is going.
Definition: DTRStatus.h:83
DTRStatus()
Make new DTRStatus with default NEW status.
Definition: DTRStatus.h:139
Error during transfer not directly related to source or destination.
Definition: DTRStatus.h:259
DTRErrorLocation GetErrorLocation() const
Returns the location at which the error occurred.
Definition: DTRStatus.h:299
Replica is being queried.
Definition: DTRStatus.h:53
Transfer completed.
Definition: DTRStatus.h:89