Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Types | Public Member Functions | Private Attributes
Arc::DataStatus Class Reference

A class to be used for return types of all major data handling methods. More...

#include <DataStatus.h>

Collaboration diagram for Arc::DataStatus:
Collaboration graph
[legend]

List of all members.

Public Types

enum  DataStatusType {
  Success = 0, ReadAcquireError = 1, ReadAcquireErrorRetryable = DataStatusRetryableBase+ReadAcquireError, WriteAcquireError = 2,
  WriteAcquireErrorRetryable = DataStatusRetryableBase+WriteAcquireError, ReadResolveError = 3, ReadResolveErrorRetryable = DataStatusRetryableBase+ReadResolveError, WriteResolveError = 4,
  WriteResolveErrorRetryable = DataStatusRetryableBase+WriteResolveError, ReadStartError = 5, ReadStartErrorRetryable = DataStatusRetryableBase+ReadStartError, WriteStartError = 6,
  WriteStartErrorRetryable = DataStatusRetryableBase+WriteStartError, ReadError = 7, ReadErrorRetryable = DataStatusRetryableBase+ReadError, WriteError = 8,
  WriteErrorRetryable = DataStatusRetryableBase+WriteError, TransferError = 9, TransferErrorRetryable = DataStatusRetryableBase+TransferError, ReadStopError = 10,
  ReadStopErrorRetryable = DataStatusRetryableBase+ReadStopError, WriteStopError = 11, WriteStopErrorRetryable = DataStatusRetryableBase+WriteStopError, PreRegisterError = 12,
  PreRegisterErrorRetryable = DataStatusRetryableBase+PreRegisterError, PostRegisterError = 13, PostRegisterErrorRetryable = DataStatusRetryableBase+PostRegisterError, UnregisterError = 14,
  UnregisterErrorRetryable = DataStatusRetryableBase+UnregisterError, CacheError = 15, CacheErrorRetryable = DataStatusRetryableBase+CacheError, CredentialsExpiredError = 16,
  DeleteError = 17, DeleteErrorRetryable = DataStatusRetryableBase+DeleteError, NoLocationError = 18, LocationAlreadyExistsError = 19,
  NotSupportedForDirectDataPointsError = 20, UnimplementedError = 21, IsReadingError = 22, IsWritingError = 23,
  CheckError = 24, CheckErrorRetryable = DataStatusRetryableBase+CheckError, ListError = 25, ListErrorRetryable = DataStatusRetryableBase+ListError,
  NotInitializedError = 26, SystemError = 27, StageError = 28, StageErrorRetryable = DataStatusRetryableBase+StageError,
  InconsistentMetadataError = 29, UnknownError = 30
}

Public Member Functions

 DataStatus (const DataStatusType &status, std::string desc="")
 DataStatus ()
 ~DataStatus ()
bool operator== (const DataStatusType &s)
bool operator== (const DataStatus &s)
bool operator!= (const DataStatusType &s)
bool operator!= (const DataStatus &s)
DataStatus operator= (const DataStatusType &s)
bool operator! ()
 operator bool ()
bool Passed (void)
bool Retryable ()
void SetDesc (std::string d)
std::string GetDesc ()
 operator std::string (void) const

Private Attributes

DataStatusType status
 status code
std::string desc
 description of failure

Detailed Description

A class to be used for return types of all major data handling methods.

It describes the outcome of the method.

Definition at line 16 of file DataStatus.h.


Member Enumeration Documentation

Enumerator:
Success 

Operation completed successfully.

ReadAcquireError 

Source is bad URL or can't be used due to some reason.

ReadAcquireErrorRetryable 
WriteAcquireError 

Destination is bad URL or can't be used due to some reason.

WriteAcquireErrorRetryable 
ReadResolveError 

Resolving of index service URL for source failed.

ReadResolveErrorRetryable 
WriteResolveError 

Resolving of index service URL for destination failed.

WriteResolveErrorRetryable 
ReadStartError 

Can't read from source.

ReadStartErrorRetryable 
WriteStartError 

Can't write to destination.

WriteStartErrorRetryable 
ReadError 

Failed while reading from source.

ReadErrorRetryable 
WriteError 

Failed while writing to destination.

WriteErrorRetryable 
TransferError 

Failed while transfering data (mostly timeout)

TransferErrorRetryable 
ReadStopError 

Failed while finishing reading from source.

ReadStopErrorRetryable 
WriteStopError 

Failed while finishing writing to destination.

WriteStopErrorRetryable 
PreRegisterError 

First stage of registration of index service URL failed.

PreRegisterErrorRetryable 
PostRegisterError 

Last stage of registration of index service URL failed.

PostRegisterErrorRetryable 
UnregisterError 

Unregistration of index service URL failed.

UnregisterErrorRetryable 
CacheError 

Error in caching procedure.

CacheErrorRetryable 
CredentialsExpiredError 

Error due to provided credentials are expired.

DeleteError 

Error deleting location or URL.

DeleteErrorRetryable 
NoLocationError 

No valid location available.

LocationAlreadyExistsError 

No valid location available.

NotSupportedForDirectDataPointsError 

Operation has no sense for this kind of URL.

UnimplementedError 

Feature is unimplemented.

IsReadingError 

DataPoint is already reading.

IsWritingError 

DataPoint is already writing.

CheckError 

Access check failed.

CheckErrorRetryable 
ListError 

File listing failed.

ListErrorRetryable 
NotInitializedError 

Object initialization failed.

SystemError 

Error in OS.

StageError 

Staging error.

StageErrorRetryable 
InconsistentMetadataError 

Inconsistent metadata.

UnknownError 

Undefined.

Definition at line 20 of file DataStatus.h.

                        {

      Success = 0,

      ReadAcquireError = 1,
      ReadAcquireErrorRetryable = DataStatusRetryableBase+ReadAcquireError,

      WriteAcquireError = 2,
      WriteAcquireErrorRetryable = DataStatusRetryableBase+WriteAcquireError,

      ReadResolveError = 3,
      ReadResolveErrorRetryable = DataStatusRetryableBase+ReadResolveError,

      WriteResolveError = 4,
      WriteResolveErrorRetryable = DataStatusRetryableBase+WriteResolveError,

      ReadStartError = 5,
      ReadStartErrorRetryable = DataStatusRetryableBase+ReadStartError,

      WriteStartError = 6,
      WriteStartErrorRetryable = DataStatusRetryableBase+WriteStartError,

      ReadError = 7,
      ReadErrorRetryable = DataStatusRetryableBase+ReadError,

      WriteError = 8,
      WriteErrorRetryable = DataStatusRetryableBase+WriteError,

      TransferError = 9,
      TransferErrorRetryable = DataStatusRetryableBase+TransferError,

      ReadStopError = 10,
      ReadStopErrorRetryable = DataStatusRetryableBase+ReadStopError,

      WriteStopError = 11,
      WriteStopErrorRetryable = DataStatusRetryableBase+WriteStopError,

      PreRegisterError = 12,
      PreRegisterErrorRetryable = DataStatusRetryableBase+PreRegisterError,

      PostRegisterError = 13,
      PostRegisterErrorRetryable = DataStatusRetryableBase+PostRegisterError,

      UnregisterError = 14,
      UnregisterErrorRetryable = DataStatusRetryableBase+UnregisterError,

      CacheError = 15,
      CacheErrorRetryable = DataStatusRetryableBase+CacheError,

      CredentialsExpiredError = 16,

      DeleteError = 17,
      DeleteErrorRetryable = DataStatusRetryableBase+DeleteError,

      NoLocationError = 18,

      LocationAlreadyExistsError = 19,

      NotSupportedForDirectDataPointsError = 20,

      UnimplementedError = 21,

      IsReadingError = 22,

      IsWritingError = 23,

      CheckError = 24,
      CheckErrorRetryable = DataStatusRetryableBase+CheckError,

      ListError = 25,
      ListErrorRetryable = DataStatusRetryableBase+ListError,

      NotInitializedError = 26,

      SystemError = 27,
    
      StageError = 28,
      StageErrorRetryable = DataStatusRetryableBase+StageError,
      
      InconsistentMetadataError = 29,
 
      UnknownError = 30
    };

Constructor & Destructor Documentation

Arc::DataStatus::DataStatus ( const DataStatusType status,
std::string  desc = "" 
) [inline]

Definition at line 135 of file DataStatus.h.

Definition at line 137 of file DataStatus.h.

      : status(Success), desc("") {}

Definition at line 139 of file DataStatus.h.

{}

Member Function Documentation

std::string Arc::DataStatus::GetDesc ( ) [inline]

Definition at line 179 of file DataStatus.h.

                        {
      return desc;
    }

Here is the caller graph for this function:

Arc::DataStatus::operator bool ( void  ) [inline]

Definition at line 163 of file DataStatus.h.

                    {
      return status == Success;
    }
Arc::DataStatus::operator std::string ( void  ) const

Definition at line 41 of file DataStatus.cpp.

                                       {
    unsigned int status_ = status;
    if (status_ >= DataStatusRetryableBase) status_-=DataStatusRetryableBase;
    if (status_ > UnknownError) status_=UnknownError;
    return status_string[status_];
  }
bool Arc::DataStatus::operator! ( void  ) [inline]

Definition at line 160 of file DataStatus.h.

                     {
      return status != Success;
    }
bool Arc::DataStatus::operator!= ( const DataStatusType s) [inline]

Definition at line 148 of file DataStatus.h.

                                             {
      return status != s;
    }
bool Arc::DataStatus::operator!= ( const DataStatus s) [inline]

Definition at line 151 of file DataStatus.h.

                                         {
      return status != s.status;
    }
DataStatus Arc::DataStatus::operator= ( const DataStatusType s) [inline]

Definition at line 155 of file DataStatus.h.

                                                  {
      status = s;
      return *this;
    }
bool Arc::DataStatus::operator== ( const DataStatusType s) [inline]

Definition at line 141 of file DataStatus.h.

                                             {
      return status == s;
    }
bool Arc::DataStatus::operator== ( const DataStatus s) [inline]

Definition at line 144 of file DataStatus.h.

                                         {
      return status == s.status;
    }
bool Arc::DataStatus::Passed ( void  ) [inline]

Definition at line 167 of file DataStatus.h.

Here is the caller graph for this function:

bool Arc::DataStatus::Retryable ( ) [inline]

Definition at line 171 of file DataStatus.h.

                     {
      return status > 100;
    }

Here is the caller graph for this function:

void Arc::DataStatus::SetDesc ( std::string  d) [inline]

Definition at line 175 of file DataStatus.h.

                              {
      desc = d;
    }

Here is the caller graph for this function:


Member Data Documentation

std::string Arc::DataStatus::desc [private]

description of failure

Definition at line 190 of file DataStatus.h.

status code

Definition at line 188 of file DataStatus.h.


The documentation for this class was generated from the following files: