This is a kind of generalized file handle. More...
#include <DataPointDirect.h>
Public Member Functions | |
virtual bool | IsIndex () const |
virtual bool | IsStageable () const |
virtual long long int | BufSize () const |
virtual int | BufNum () const |
virtual bool | Local () const |
virtual void | ReadOutOfOrder (bool v) |
virtual bool | WriteOutOfOrder () |
virtual void | SetAdditionalChecks (bool v) |
virtual bool | GetAdditionalChecks () const |
virtual void | SetSecure (bool v) |
virtual bool | GetSecure () const |
virtual void | Passive (bool v) |
virtual void | Range (unsigned long long int start=0, unsigned long long int end=0) |
virtual int | AddCheckSumObject (CheckSum *cksum) |
virtual const CheckSum * | GetCheckSumObject (int index) const |
virtual DataStatus | Stat (std::list< FileInfo > &files, const std::list< DataPoint * > &urls, DataPointInfoType verb=INFO_TYPE_ALL) |
virtual DataStatus | Resolve (bool source) |
virtual DataStatus | Resolve (bool source, const std::list< DataPoint * > &urls) |
virtual bool | Registered () const |
virtual DataStatus | PreRegister (bool replication, bool force=false) |
virtual DataStatus | PostRegister (bool replication) |
virtual DataStatus | PreUnregister (bool replication) |
virtual DataStatus | Unregister (bool all) |
virtual bool | AcceptsMeta () const |
virtual bool | ProvidesMeta () const |
virtual const URL & | CurrentLocation () const |
virtual DataPoint * | CurrentLocationHandle () const |
virtual const std::string & | CurrentLocationMetadata () const |
virtual DataStatus | CompareLocationMetadata () const |
virtual bool | NextLocation () |
virtual bool | LocationValid () const |
virtual bool | HaveLocations () const |
virtual bool | LastLocation () |
virtual DataStatus | AddLocation (const URL &url, const std::string &meta) |
virtual DataStatus | RemoveLocation () |
virtual DataStatus | RemoveLocations (const DataPoint &p) |
virtual DataStatus | ClearLocations () |
virtual void | SortLocations (const std::string &, const URLMap &) |
This is a kind of generalized file handle.
Differently from file handle it does not support operations read() and write(). Instead it initiates operation and uses object of class DataBuffer to pass actual data. It also provides other operations like querying parameters of remote object. It is used by higher-level classes DataMove and DataMovePar to provide data transfer service for application.
virtual int Arc::DataPointDirect::AddCheckSumObject | ( | CheckSum * | cksum | ) | [virtual] |
Add a checksum object which will compute checksum during transmission.
cksum | object which will compute checksum. Should not be destroyed till DataPointer itself. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::AddLocation | ( | const URL & | url, | |
const std::string & | meta | |||
) | [virtual] |
Add URL to list.
url | Location URL to add. | |
meta | Location meta information. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::CompareLocationMetadata | ( | ) | const [virtual] |
Compare metadata of DataPoint and current location.
Returns inconsistency error or error encountered during operation, or success
Implements Arc::DataPoint.
virtual const std::string& Arc::DataPointDirect::CurrentLocationMetadata | ( | ) | const [virtual] |
Returns meta information used to create current URL.
Usage differs between different indexing services.
Implements Arc::DataPoint.
virtual bool Arc::DataPointDirect::NextLocation | ( | ) | [virtual] |
Switch to next location in list of URLs.
At last location switch to first if number of allowed retries is not exceeded. Returns false if no retries left.
Implements Arc::DataPoint.
virtual void Arc::DataPointDirect::Passive | ( | bool | v | ) | [virtual] |
Request passive transfers for FTP-like protocols.
true | to request. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::PostRegister | ( | bool | replication | ) | [virtual] |
Index Service postregistration.
Used for same purpose as PreRegister. Should be called after actual transfer of file successfully finished.
replication | if true, the file is being replicated between two locations registered in Indexing Service under same name. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::PreRegister | ( | bool | replication, | |
bool | force = false | |||
) | [virtual] |
Index service preregistration.
This function registers the physical location of a file into an indexing service. It should be called *before* the actual transfer to that location happens.
replication | if true, the file is being replicated between two locations registered in the indexing service under same name. | |
force | if true, perform registration of a new file even if it already exists. Should be used to fix failures in Indexing Service. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::PreUnregister | ( | bool | replication | ) | [virtual] |
Index Service preunregistration.
Should be called if file transfer failed. It removes changes made by PreRegister.
replication | if true, the file is being replicated between two locations registered in Indexing Service under same name. |
Implements Arc::DataPoint.
virtual bool Arc::DataPointDirect::ProvidesMeta | ( | ) | const [virtual] |
If endpoint can provide at least some meta information directly.
Implements Arc::DataPoint.
virtual void Arc::DataPointDirect::Range | ( | unsigned long long int | start = 0 , |
|
unsigned long long int | end = 0 | |||
) | [virtual] |
virtual void Arc::DataPointDirect::ReadOutOfOrder | ( | bool | v | ) | [virtual] |
Allow/disallow DataPoint to produce scattered data during reading* operation.
v | true if allowed (default is false). |
Implements Arc::DataPoint.
virtual bool Arc::DataPointDirect::Registered | ( | ) | const [virtual] |
Check if file is registered in Indexing Service.
Proper value is obtainable only after Resolve.
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::Resolve | ( | bool | source, | |
const std::list< DataPoint * > & | urls | |||
) | [virtual] |
Resolves several index service URLs.
Can use bulk calls if protocol allows. The protocols and hosts of all the DataPoints in urls must be the same and the same as this DataPoint's protocol and host. This method can be called on any of the urls, for example urls.front()->Resolve(true, urls);
source | true if DataPoint objects represent source of information | |
urls | List of DataPoints to resolve. Protocols and hosts must match and match this DataPoint's protocol and host. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::Resolve | ( | bool | source | ) | [virtual] |
Resolves index service URL into list of ordinary URLs.
Also obtains meta information about the file.
source | true if DataPoint object represents source of information. |
Implements Arc::DataPoint.
virtual void Arc::DataPointDirect::SetAdditionalChecks | ( | bool | v | ) | [virtual] |
Allow/disallow additional checks.
Check for existence of remote file (and probably other checks too) before initiating reading and writing operations.
v | true if allowed (default is true). |
Implements Arc::DataPoint.
virtual void Arc::DataPointDirect::SetSecure | ( | bool | v | ) | [virtual] |
Allow/disallow heavy security during data transfer.
v | true if allowed (default depends on protocol). |
Implements Arc::DataPoint.
virtual void Arc::DataPointDirect::SortLocations | ( | const std::string & | pattern, | |
const URLMap & | url_map | |||
) | [inline, virtual] |
Sort locations according to the specified pattern.
pattern | a set of strings, separated by |, to match against. |
Implements Arc::DataPoint.
virtual DataStatus Arc::DataPointDirect::Stat | ( | std::list< FileInfo > & | files, | |
const std::list< DataPoint * > & | urls, | |||
DataPointInfoType | verb = INFO_TYPE_ALL | |||
) | [virtual] |
Retrieve information about several DataPoints.
If a DataPoint represents a directory or something similar, information about the object itself and not its contents will be obtained. This method can use bulk operations if the protocol supports it. The protocols and hosts of all the DataPoints in urls must be the same and the same as this DataPoint's protocol and host. This method can be called on any of the urls, for example urls.front()->Stat(files, urls); Calling this method with an empty list of urls returns success if the protocol supports bulk Stat, and an error if it does not.
files | will contain objects' names and requested attributes. There may be more attributes than requested. There may be less if objects can't provide particular information. The order of this vector matches the order of urls. If a stat of any url fails then the corresponding FileInfo in this list will evaluate to false. | |
urls | list of DataPoints to stat. Protocols and hosts must match and match this DataPoint's protocol and host. | |
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 DataStatus Arc::DataPointDirect::Unregister | ( | bool | all | ) | [virtual] |
Index Service unregistration.
Remove information about file registered in Indexing Service.
all | if true, information about file itself is (LFN) is removed. Otherwise only particular physical instance is unregistered. |
Implements Arc::DataPoint.
virtual bool Arc::DataPointDirect::WriteOutOfOrder | ( | ) | [virtual] |
Returns true if URL can accept scattered data for *writing* operation.
Implements Arc::DataPoint.