ARC SDK
|
Public Member Functions | |
DataPointDelegate (char const *module_name, const URL &url, const UserConfig &usercfg, PluginArgument *parg) | |
Create object which starts special executable which loads specified module. More... | |
DataPointDelegate (char const *exec_path, std::list< std::string > const &extra, const URL &url, const UserConfig &usercfg, PluginArgument *parg) | |
Create object which starts specified external executable. More... | |
virtual DataStatus | StartReading (DataBuffer &buf) |
Start reading data from URL. More... | |
virtual DataStatus | StartWriting (DataBuffer &buf, DataCallback *space_cb=NULL) |
Start writing data to URL. More... | |
virtual DataStatus | StopReading () |
Stop reading. More... | |
virtual DataStatus | StopWriting () |
Stop writing. More... | |
virtual DataStatus | Check (bool check_meta) |
Query the DataPoint to check if object is accessible. More... | |
virtual DataStatus | Remove () |
Remove/delete object at URL. More... | |
virtual DataStatus | CreateDirectory (bool with_parents=false) |
Create a directory. More... | |
virtual DataStatus | Stat (FileInfo &file, DataPointInfoType verb=INFO_TYPE_ALL) |
Retrieve information about this object. More... | |
virtual DataStatus | List (std::list< FileInfo > &files, DataPointInfoType verb=INFO_TYPE_ALL) |
List hierarchical content of this object. More... | |
virtual DataStatus | Rename (const URL &newurl) |
Rename a URL. More... | |
virtual DataStatus | Transfer (const URL &otherendpoint, bool source, TransferCallback callback=NULL) |
Do a transfer in a single operation. More... | |
virtual bool | WriteOutOfOrder () const |
Returns true if DataPoint supports receiving data out of order during writing. More... | |
virtual bool | ProvidesMeta () const |
Check if endpoint can provide at least some meta information directly. More... | |
virtual const std::string | DefaultCheckSum () const |
Default checksum type (varies by protocol) More... | |
virtual bool | RequiresCredentials () const |
Returns true if some kind of credentials are needed to use this DataPoint. More... | |
![]() | |
virtual bool | IsIndex () const |
Check if URL is an Indexing Service. More... | |
virtual bool | IsStageable () const |
Check if URL should be staged or queried for Transport URL (TURL) More... | |
virtual long long int | BufSize () const |
Get suggested buffer size for transfers. More... | |
virtual int | BufNum () const |
Get suggested number of buffers for transfers. More... | |
virtual bool | Local () const |
Returns true if file is local, e.g. file:// urls. More... | |
virtual bool | ReadOnly () const |
Returns true if file is readonly. More... | |
virtual void | ReadOutOfOrder (bool v) |
Allow/disallow DataPoint to read data out of order. More... | |
virtual void | SetAdditionalChecks (bool v) |
Allow/disallow additional checks on a source DataPoint before transfer. More... | |
virtual bool | GetAdditionalChecks () const |
Returns true unless SetAdditionalChecks() was set to false. More... | |
virtual void | SetSecure (bool v) |
Allow/disallow heavy security (data encryption) during data transfer. More... | |
virtual bool | GetSecure () const |
Returns true if heavy security during data transfer is allowed. More... | |
virtual void | Passive (bool v) |
Set passive transfers for FTP-like protocols. More... | |
virtual void | Range (unsigned long long int start=0, unsigned long long int end=0) |
Set range of bytes to retrieve. More... | |
virtual int | AddCheckSumObject (CheckSum *cksum) |
Add a checksum object which will compute checksum during data transfer. More... | |
virtual const CheckSum * | GetCheckSumObject (int index) const |
Get CheckSum object at given position in list. More... | |
virtual DataStatus | Stat (std::list< FileInfo > &files, const std::list< DataPoint *> &urls, DataPointInfoType verb=INFO_TYPE_ALL) |
Retrieve information about several DataPoints. More... | |
virtual DataStatus | Resolve (bool source) |
Resolves index service URL into list of ordinary URLs. More... | |
virtual DataStatus | Resolve (bool source, const std::list< DataPoint *> &urls) |
Resolves several index service URLs. More... | |
virtual bool | Registered () const |
Returns true if file is registered in indexing service (only known after Resolve()) More... | |
virtual DataStatus | PreRegister (bool replication, bool force=false) |
Index service pre-registration. More... | |
virtual DataStatus | PostRegister (bool replication) |
Index service post-registration. More... | |
virtual DataStatus | PreUnregister (bool replication) |
Index service pre-unregistration. More... | |
virtual DataStatus | Unregister (bool all) |
Index service unregistration. More... | |
virtual bool | AcceptsMeta () const |
Check if endpoint can have any use from meta information. More... | |
virtual const URL & | CurrentLocation () const |
Returns current (resolved) URL. More... | |
virtual DataPoint * | CurrentLocationHandle () const |
Returns a pointer to the DataPoint representing the current location. More... | |
virtual const std::string & | CurrentLocationMetadata () const |
Returns meta information used to create current URL. More... | |
virtual DataStatus | CompareLocationMetadata () const |
Compare metadata of DataPoint and current location. More... | |
virtual bool | NextLocation () |
Switch to next location in list of URLs. More... | |
virtual bool | LocationValid () const |
Returns false no more locations are left and out of retries. More... | |
virtual bool | HaveLocations () const |
Returns true if number of resolved URLs is not 0. More... | |
virtual bool | LastLocation () |
Returns true if the current location is the last. More... | |
virtual DataStatus | AddLocation (const URL &url, const std::string &meta) |
Add URL representing physical replica to list of locations. More... | |
virtual DataStatus | RemoveLocation () |
Remove current URL from list. More... | |
virtual DataStatus | RemoveLocations (const DataPoint &p) |
Remove locations present in another DataPoint object. More... | |
virtual DataStatus | ClearLocations () |
Remove all locations. More... | |
virtual void | SortLocations (const std::string &, const URLMap &) |
Sort locations according to the specified pattern and URLMap. More... | |
![]() | |
virtual | ~DataPoint () |
Destructor. More... | |
virtual const URL & | GetURL () const |
Returns the URL that was passed to the constructor. More... | |
virtual const UserConfig & | GetUserConfig () const |
Returns the UserConfig that was passed to the constructor. More... | |
virtual bool | SetURL (const URL &url) |
Assigns new URL. More... | |
virtual std::string | str () const |
Returns a string representation of the DataPoint. More... | |
virtual | operator bool () const |
Is DataPoint valid? More... | |
virtual bool | operator! () const |
Is DataPoint valid? More... | |
virtual DataStatus | PrepareReading (unsigned int timeout, unsigned int &wait_time) |
Prepare DataPoint for reading. More... | |
virtual DataStatus | PrepareWriting (unsigned int timeout, unsigned int &wait_time) |
Prepare DataPoint for writing. More... | |
virtual DataStatus | FinishReading (bool error=false) |
Finish reading from the URL. More... | |
virtual DataStatus | FinishWriting (bool error=false) |
Finish writing to the URL. More... | |
virtual DataStatus | GetFailureReason (void) const |
Returns reason of transfer failure, as reported by callbacks. More... | |
virtual bool | CheckSize () const |
Check if meta-information 'size' is available. More... | |
virtual void | SetSize (const unsigned long long int val) |
Set value of meta-information 'size'. More... | |
virtual unsigned long long int | GetSize () const |
Get value of meta-information 'size'. More... | |
virtual bool | CheckCheckSum () const |
Check if meta-information 'checksum' is available. More... | |
virtual void | SetCheckSum (const std::string &val) |
Set value of meta-information 'checksum'. More... | |
virtual const std::string & | GetCheckSum () const |
Get value of meta-information 'checksum'. More... | |
virtual bool | CheckModified () const |
Check if meta-information 'modification time' is available. More... | |
virtual void | SetModified (const Time &val) |
Set value of meta-information 'modification time'. More... | |
virtual const Time & | GetModified () const |
Get value of meta-information 'modification time'. More... | |
virtual bool | CheckValid () const |
Check if meta-information 'validity time' is available. More... | |
virtual void | SetValid (const Time &val) |
Set value of meta-information 'validity time'. More... | |
virtual const Time & | GetValid () const |
Get value of meta-information 'validity time'. More... | |
virtual void | SetAccessLatency (const DataPointAccessLatency &latency) |
Set value of meta-information 'access latency'. More... | |
virtual DataPointAccessLatency | GetAccessLatency () const |
Get value of meta-information 'access latency'. More... | |
virtual bool | Cache () const |
Returns true if file is cacheable. More... | |
virtual int | GetTries () const |
Returns number of retries left. More... | |
virtual void | SetTries (const int n) |
Set number of retries. More... | |
virtual void | NextTry () |
Decrease number of retries left. More... | |
virtual bool | RequiresCredentialsInFile () const |
Returns true if credentials must be stored in files. More... | |
virtual bool | SupportsTransfer () const |
Returns true if DataPoint supports internal transfer. More... | |
virtual void | SetMeta (const DataPoint &p) |
Copy meta information from another object. More... | |
virtual void | ResetMeta () |
Reset meta information to default (undefined) values. More... | |
virtual bool | CompareMeta (const DataPoint &p) const |
Compare meta information from another object. More... | |
virtual std::vector< URL > | TransferLocations () const |
Returns physical file(s) to read/write, if different from CurrentLocation() More... | |
virtual void | ClearTransferLocations () |
Clear list of physical file(s) to read/write. More... | |
virtual void | AddURLOptions (const std::map< std::string, std::string > &options) |
Add URL options to this DataPoint's URL object. More... | |
Protected Member Functions | |
virtual DataStatus | Transfer3rdParty (const URL &source, const URL &destination, TransferCallback callback=NULL) |
Perform third party transfer. More... | |
![]() | |
DataPointDirect (const URL &url, const UserConfig &usercfg, PluginArgument *parg) | |
![]() | |
DataPoint (const URL &url, const UserConfig &usercfg, PluginArgument *parg) | |
Constructor. More... | |
Additional Inherited Members | |
![]() | |
enum | DataPointAccessLatency { ACCESS_LATENCY_ZERO, ACCESS_LATENCY_SMALL, ACCESS_LATENCY_LARGE } |
Describes the latency to access this URL. More... | |
enum | DataPointInfoType { INFO_TYPE_MINIMAL = 0, INFO_TYPE_NAME = 1, INFO_TYPE_TYPE = 2, INFO_TYPE_TIMES = 4, INFO_TYPE_CONTENT = 8, INFO_TYPE_CKSUM = 128, INFO_TYPE_ACCESS = 16, INFO_TYPE_STRUCT = 32, INFO_TYPE_REST = 64, INFO_TYPE_ALL = 255 } |
Describes type of information about URL to request. More... | |
typedef void(* | TransferCallback) (unsigned long long int bytes_transferred) |
Callback for use in protocol-internal or 3rd party transfers. More... | |
![]() | |
static DataStatus | Transfer3rdParty (const URL &source, const URL &destination, const UserConfig &usercfg, TransferCallback callback=NULL) |
Perform third party transfer. More... | |
![]() | |
DataBuffer * | buffer |
long long int | bufsize |
int | bufnum |
bool | local |
bool | readonly |
bool | linkable |
bool | is_secure |
bool | force_secure |
bool | force_passive |
bool | additional_checks |
bool | allow_out_of_order |
unsigned long long int | range_start |
unsigned long long int | range_end |
std::list< CheckSum * > | checksums |
![]() | |
URL | url |
URL supplied in constructor. More... | |
const UserConfig | usercfg |
UserConfig supplied in constructor. More... | |
unsigned long long int | size |
Size of object represented by DataPoint. More... | |
std::string | checksum |
Checksum of object represented by DataPoint. More... | |
Time | modified |
Modification time of object represented by DataPoint. More... | |
Time | valid |
Validity time of object represented by DataPoint. More... | |
DataPointAccessLatency | access_latency |
Access latency of object represented by DataPoint. More... | |
int | triesleft |
Retries left for data transfer. More... | |
DataStatus | failure_code |
Result of data read/write carried out in separate thread. More... | |
bool | cache |
Whether this DataPoint is cacheable. More... | |
bool | stageable |
Whether this DataPoint requires staging. More... | |
std::set< std::string > | valid_url_options |
Valid URL options. Subclasses should add their own specific options to this list. More... | |
![]() | |
static Logger | logger |
Logger object. More... | |
Arc::DataPointDelegate::DataPointDelegate | ( | char const * | module_name, |
const URL & | url, | ||
const UserConfig & | usercfg, | ||
PluginArgument * | parg | ||
) |
Create object which starts special executable which loads specified module.
Arc::DataPointDelegate::DataPointDelegate | ( | char const * | exec_path, |
std::list< std::string > const & | extra, | ||
const URL & | url, | ||
const UserConfig & | usercfg, | ||
PluginArgument * | parg | ||
) |
Create object which starts specified external executable.
|
virtual |
Query the DataPoint to check if object is accessible.
If check_meta is true this method will also try to provide meta information about the object. Note that for many protocols an access check also provides meta information and so check_meta may have no effect.
check_meta | If true then the method will try to retrieve meta data during the check. |
Implements Arc::DataPoint.
|
virtual |
Create a directory.
If the protocol supports it, this method creates the last directory in the path to the URL. It assumes the last component of the path is a file-like object and not a directory itself, unless the path ends in a directory separator. If with_parents is true then all missing parent directories in the path will also be created. The access control on the new directories is protocol-specific and may vary depending on protocol.
with_parents | If true then all missing directories in the path are created |
Implements Arc::DataPoint.
|
virtual |
Default checksum type (varies by protocol)
Reimplemented from Arc::DataPoint.
|
virtual |
List hierarchical content of this object.
If the DataPoint represents a directory or something similar its contents will be listed and put into files. If the DataPoint is file- like an error will be returned.
files | will contain list of file names and requested attributes. There may be more attributes than requested. There may be less if object can't provide particular information. |
verb | defines attribute types which method must try to retrieve. It is not a failure if some attributes could not be retrieved due to limitation of protocol or access control. |
Implements Arc::DataPoint.
|
virtual |
Check if endpoint can provide at least some meta information directly.
Reimplemented from Arc::DataPointDirect.
|
virtual |
Remove/delete object at URL.
Implements Arc::DataPoint.
|
virtual |
Rename a URL.
This method renames the file or directory specified in the constructor to the new name specified in newurl. It only performs namespace operations using the paths of the two URLs and in general ignores any differences in protocol and host between them. It is assumed that checks that the URLs are consistent are done by the caller of this method. This method does not do any data transfer and is only implemented for protocols which support renaming as an atomic namespace operation.
newurl | The new name for the URL |
Implements Arc::DataPoint.
|
virtual |
Returns true if some kind of credentials are needed to use this DataPoint.
Reimplemented from Arc::DataPoint.
|
virtual |
Start reading data from URL.
A separate thread to transfer data will be created. No other operation can be performed while reading is in progress. Progress of the transfer should be followed using the DataBuffer object.
buffer | operation will use this buffer to put information into. Should not be destroyed before StopReading() was called and returned. If StopReading() is not called explicitly to release buffer it will be released in destructor of DataPoint which also usually calls StopReading(). |
Implements Arc::DataPoint.
|
virtual |
Start writing data to URL.
A separate thread to transfer data will be created. No other operation can be performed while writing is in progress. Progress of the transfer should be followed using the DataBuffer object.
buffer | operation will use this buffer to get information from. Should not be destroyed before StopWriting() was called and returned. If StopWriting() is not called explicitly to release buffer it will be released in destructor of DataPoint which also usually calls StopWriting(). |
space_cb | callback which is called if there is not enough space to store data. May not implemented for all protocols. |
Implements Arc::DataPoint.
|
virtual |
Retrieve information about this object.
If the DataPoint represents a directory or something similar, information about the object itself and not its contents will be obtained.
file | will contain object name and requested attributes. There may be more attributes than requested. There may be less if object can't provide particular information. |
verb | defines attribute types which method must try to retrieve. It is not a failure if some attributes could not be retrieved due to limitation of protocol or access control. |
Implements Arc::DataPoint.
|
virtual |
Stop reading.
Must be called after corresponding StartReading() method, either after all data is transferred or to cancel transfer. Use buffer object to find out when data is transferred.
Implements Arc::DataPoint.
|
virtual |
Stop writing.
Must be called after corresponding StartWriting() method, either after all data is transferred or to cancel transfer. Use buffer object to find out when data is transferred.
Implements Arc::DataPoint.
|
virtual |
Do a transfer in a single operation.
This method is designed for plugins which support doing transfers between different endpoints in a single operation, rather than two separate DataPoints communicating with each other via a DataBuffer.
endpoint | Other endpoint to transfer to or from |
source | Whether this DataPoint is the source (true) or destination (false) |
callback | Optional monitoring callback |
Reimplemented from Arc::DataPoint.
|
protectedvirtual |
Perform third party transfer.
This method is protected because the static version should be used instead to load the correct DMC plugin for third party transfer.
source | Source URL to pull data from |
destination | Destination URL which pulls data to itself |
callback | Optional monitoring callback |
Reimplemented from Arc::DataPoint.
|
virtual |
Returns true if DataPoint supports receiving data out of order during writing.
Reimplemented from Arc::DataPointDirect.