/usr/include/arc/data/DataPointIndex.h is in nordugrid-arc-dev 4.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | // -*- indent-tabs-mode: nil -*-
#ifndef __ARC_DATAPOINTINDEX_H__
#define __ARC_DATAPOINTINDEX_H__
#include <list>
#include <string>
#include <arc/data/DataHandle.h>
#include <arc/data/DataPoint.h>
namespace Arc {
/// DataPointIndex represents "index" data objects, e.g. catalogs.
/**
* This class should never be used directly, instead inherit from it to
* provide a class for a specific indexing service.
* \ingroup data
* \headerfile DataPointIndex.h arc/data/DataPointIndex.h
*/
class DataPointIndex
: public DataPoint {
public:
virtual ~DataPointIndex();
virtual const URL& CurrentLocation() const;
virtual const std::string& CurrentLocationMetadata() const;
virtual DataPoint* CurrentLocationHandle() const;
virtual DataStatus CompareLocationMetadata() const;
virtual bool NextLocation();
virtual bool LocationValid() const;
virtual bool HaveLocations() const;
virtual bool LastLocation();
virtual DataStatus RemoveLocation();
virtual DataStatus RemoveLocations(const DataPoint& p);
virtual DataStatus ClearLocations();
virtual DataStatus AddLocation(const URL& url, const std::string& meta);
virtual void SortLocations(const std::string& pattern,
const URLMap& url_map);
virtual bool IsIndex() const;
virtual bool IsStageable() const;
virtual bool AcceptsMeta() const;
virtual bool ProvidesMeta() const;
virtual void SetMeta(const DataPoint& p);
virtual void SetCheckSum(const std::string& val);
virtual void SetSize(const unsigned long long int val);
virtual bool Registered() const;
virtual void SetTries(const int n);
// the following are relayed to the current location
virtual long long int BufSize() const;
virtual int BufNum() const;
virtual bool Local() const;
virtual bool ReadOnly() const;
virtual DataStatus PrepareReading(unsigned int timeout,
unsigned int& wait_time);
virtual DataStatus PrepareWriting(unsigned int timeout,
unsigned int& wait_time);
virtual DataStatus StartReading(DataBuffer& buffer);
virtual DataStatus StartWriting(DataBuffer& buffer,
DataCallback *space_cb = NULL);
virtual DataStatus StopReading();
virtual DataStatus StopWriting();
virtual DataStatus FinishReading(bool error = false);
virtual DataStatus FinishWriting(bool error = false);
virtual std::vector<URL> TransferLocations() const;
virtual void ClearTransferLocations();
virtual DataStatus Check(bool check_meta);
virtual DataStatus Remove();
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 DataPointAccessLatency GetAccessLatency() 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;
protected:
bool resolved;
bool registered;
DataPointIndex(const URL& url, const UserConfig& usercfg, PluginArgument* parg);
private:
// Following members must be kept synchronised hence they are private
/// List of locations at which file can be probably found.
std::list<URLLocation> locations;
std::list<URLLocation>::iterator location;
DataHandle *h;
void SetHandle();
};
} // namespace Arc
#endif // __ARC_DATAPOINTINDEX_H__
|