irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dataObjOpr.hpp
Go to the documentation of this file.
1 
4 /* dataObjOpr.hpp - header file for dataObjOpr.c
5  */
6 
7 
8 
9 #ifndef DATA_OBJ_OPR_HPP
10 #define DATA_OBJ_OPR_HPP
11 
12 #include "rods.h"
13 #include "objInfo.h"
14 #include "dataObjInpOut.h"
15 #include "ruleExecSubmit.h"
16 #include "rcGlobalExtern.h"
17 #include "rsGlobalExtern.hpp"
18 //#include "reIn2p3SysRule.hpp"
19 #include "irods_file_object.hpp"
21 
22 /* definition for return value of resolveSingleReplCopy */
23 #define NO_GOOD_COPY 0
24 #define HAVE_GOOD_COPY 1
25 
26 /* definition for trimjFlag in matchAndTrimRescGrp */
27 #define TRIM_MATCHED_RESC_INFO 0x1
28 #define REQUE_MATCHED_RESC_INFO 0x2
29 #define TRIM_MATCHED_OBJ_INFO 0x4
30 #define TRIM_UNMATCHED_OBJ_INFO 0x8
31 
32 #define MULTI_COPIES_PER_RESC "MULTI_COPIES_PER_RESC"
33 
34 irods::error validate_logical_path(const std::string&);
35 
37  rsComm_t*,
38  const std::string&,
39  std::string& );
40 int
41 getDataObjInfo( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
42  dataObjInfo_t **dataObjInfoHead, char *accessPerm, int ignoreCondInput );
43 int
44 updateDataObjReplStatus( rsComm_t *rsComm, int l1descInx, int replStatus );
45 int
46 dataObjExist( rsComm_t *rsComm, dataObjInp_t *dataObjInp );
47 int
48 sortObjInfoForRepl( dataObjInfo_t **dataObjInfoHead,
49  dataObjInfo_t **oldDataObjInfoHead,
50  int deleteOldFlag, const char* resc_hier,
51  const char* dst_resc_hier );
52 int
53 sortObjInfoForOpen( dataObjInfo_t **dataObjInfoHead,
54  keyValPair_t *condInput, int writeFlag );
56  const std::string& resc_hier,
57  const irods::file_object_ptr file_obj,
58  dataObjInfo_t **data_obj_info_head);
59 int
60 sortDataObjInfoRandom( dataObjInfo_t **dataObjInfoHead );
61 int
62 requeDataObjInfoByResc( dataObjInfo_t **dataObjInfoHead, const char *preferedResc,
63  int writeFlag, int topFlag );
64 int
65 requeDataObjInfoByReplNum( dataObjInfo_t **dataObjInfoHead, int replNum );
67 chkCopyInResc( dataObjInfo_t *&dataObjInfoHead, const std::string& _resc_name, const char* destRescHier );
68 
69 int
70 initDataObjInfoQuery( dataObjInp_t *dataObjInp, genQueryInp_t *genQueryInp,
71  int ignoreCondInput );
72 int
73 sortObjInfo( dataObjInfo_t **dataObjInfoHead,
74  dataObjInfo_t **dirtyArchInfo, dataObjInfo_t **dirtyCacheInfo,
75  dataObjInfo_t **oldArchInfo, dataObjInfo_t **oldCacheInfo,
76  dataObjInfo_t **downCurrentInfo, dataObjInfo_t **downOldInfo );
77 int
78 chkOrphanFile( rsComm_t *rsComm, char *filePath, const char *rescName,
79  dataObjInfo_t *dataObjInfo );
80 int
81 chkOrphanDir( rsComm_t *rsComm, char *dirPath, const char *rescName );
82 int
83 getNumDataObjInfo( dataObjInfo_t *dataObjInfoHead );
84 int
85 resolveSingleReplCopy( dataObjInfo_t **dataObjInfoHead,
86  dataObjInfo_t **oldDataObjInfoHead,
87  const std::string& _resc_name,
88  dataObjInfo_t **destDataObjInfo, keyValPair_t *condInput );
89 int
91  dataObjInfo_t **oldDataObjInfoHead, keyValPair_t *condInput,
92  dataObjInfo_t **matchedDataObjInfo, dataObjInfo_t **matchedOldDataObjInfo );
93 int
94 resolveInfoForPhymv( dataObjInfo_t **dataObjInfoHead,
95  dataObjInfo_t **oldDataObjInfoHead, const std::string& _resc_name,
96  keyValPair_t *condInput, int multiCopyFlag );
97 int
98 matchAndTrimRescGrp( dataObjInfo_t **dataObjInfoHead,
99  const std::string& _resc_name,
100  int trimjFlag,
101  dataObjInfo_t **trimmedDataObjInfo );
102 int
103 resolveInfoForTrim( dataObjInfo_t **dataObjInfoHead,
104  keyValPair_t *condInput );
105 int
106 requeDataObjInfoByDestResc( dataObjInfo_t **dataObjInfoHead,
107  keyValPair_t *condInput, int writeFlag, int topFlag );
108 int
110  keyValPair_t *condInput, int writeFlag, int topFlag );
111 int
112 getDataObjInfoIncSpecColl( rsComm_t *rsComm, dataObjInp_t *dataObjInp,
113  dataObjInfo_t **dataObjInfo );
114 int
115 regNewObjSize( rsComm_t *rsComm, char *objPath, int replNum,
116  rodsLong_t newSize );
117 int
118 getDataObjByClass( dataObjInfo_t *dataObjInfoHead, int rescClass,
119  dataObjInfo_t **outDataObjInfo );
120 
122 
124 
126 
128 
129 // returns true if an object exists in [_objects] that satisfies [_pred].
130 //
131 // [UnaryPredicate]
132 // - signature: bool(const dataObjInfo_t&)
133 // - must return true for the required element.
134 template <typename UnaryPredicate>
135 bool contains_replica_if(const dataObjInfo_t* _objects, UnaryPredicate&& _pred) {
136  auto e = end(_objects);
137  return std::find_if(begin(_objects), e, std::forward<UnaryPredicate>(_pred)) != e;
138 }
139 
140 bool contains_replica(const dataObjInfo_t* _objects, const std::string& _resc_name);
141 
142 bool contains_replica(const dataObjInfo_t* _objects, int _replica_number);
143 
144 #endif /* DATA_OBJ_OPR_H */
rsComm_t
Definition: rcConnect.h:145
getDataObjByClass
int getDataObjByClass(dataObjInfo_t *dataObjInfoHead, int rescClass, dataObjInfo_t **outDataObjInfo)
irods_file_object.hpp
validate_logical_path
irods::error validate_logical_path(const std::string &)
Definition: dataObjOpr.cpp:47
getNumDataObjInfo
int getNumDataObjInfo(dataObjInfo_t *dataObjInfoHead)
Definition: dataObjOpr.cpp:688
GenQueryInp
Definition: rodsGenQuery.h:24
resolve_hierarchy_for_resc_from_cond_input
irods::error resolve_hierarchy_for_resc_from_cond_input(rsComm_t *, const std::string &, std::string &)
Definition: dataObjOpr.cpp:1880
sortObjInfo
int sortObjInfo(dataObjInfo_t **dataObjInfoHead, dataObjInfo_t **dirtyArchInfo, dataObjInfo_t **dirtyCacheInfo, dataObjInfo_t **oldArchInfo, dataObjInfo_t **oldCacheInfo, dataObjInfo_t **downCurrentInfo, dataObjInfo_t **downOldInfo)
begin
irods::linked_list_iterator< dataObjInfo_t > begin(dataObjInfo_t *_objects) noexcept
Definition: dataObjOpr.cpp:1939
rcGlobalExtern.h
end
irods::linked_list_iterator< dataObjInfo_t > end(dataObjInfo_t *_objects) noexcept
Definition: dataObjOpr.cpp:1947
irods::linked_list_iterator
Definition: irods_linked_list_iterator.hpp:19
dataObjInpOut.h
rsGlobalExtern.hpp
dataObjExist
int dataObjExist(rsComm_t *rsComm, dataObjInp_t *dataObjInp)
contains_replica
bool contains_replica(const dataObjInfo_t *_objects, const std::string &_resc_name)
Definition: dataObjOpr.cpp:1955
ruleExecSubmit.h
getDataObjInfoIncSpecColl
int getDataObjInfoIncSpecColl(rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t **dataObjInfo)
Definition: dataObjOpr.cpp:1767
regNewObjSize
int regNewObjSize(rsComm_t *rsComm, char *objPath, int replNum, rodsLong_t newSize)
Definition: dataObjOpr.cpp:1847
DataObjInp
Definition: dataObjInpOut.h:65
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
initDataObjInfoQuery
int initDataObjInfoQuery(dataObjInp_t *dataObjInp, genQueryInp_t *genQueryInp, int ignoreCondInput)
Definition: dataObjOpr.cpp:1044
sortObjInfoForOpen
int sortObjInfoForOpen(dataObjInfo_t **dataObjInfoHead, keyValPair_t *condInput, int writeFlag)
Definition: dataObjOpr.cpp:548
matchAndTrimRescGrp
int matchAndTrimRescGrp(dataObjInfo_t **dataObjInfoHead, const std::string &_resc_name, int trimjFlag, dataObjInfo_t **trimmedDataObjInfo)
Definition: dataObjOpr.cpp:883
contains_replica_if
bool contains_replica_if(const dataObjInfo_t *_objects, UnaryPredicate &&_pred)
Definition: dataObjOpr.hpp:135
matchDataObjInfoByCondInput
int matchDataObjInfoByCondInput(dataObjInfo_t **dataObjInfoHead, dataObjInfo_t **oldDataObjInfoHead, keyValPair_t *condInput, dataObjInfo_t **matchedDataObjInfo, dataObjInfo_t **matchedOldDataObjInfo)
Definition: dataObjOpr.cpp:1420
getDataObjInfo
int getDataObjInfo(rsComm_t *rsComm, dataObjInp_t *dataObjInp, dataObjInfo_t **dataObjInfoHead, char *accessPerm, int ignoreCondInput)
Definition: dataObjOpr.cpp:87
irods::error
Definition: irods_error.hpp:23
chkOrphanDir
int chkOrphanDir(rsComm_t *rsComm, char *dirPath, const char *rescName)
Definition: dataObjOpr.cpp:1245
requeDataObjInfoBySrcResc
int requeDataObjInfoBySrcResc(dataObjInfo_t **dataObjInfoHead, keyValPair_t *condInput, int writeFlag, int topFlag)
objInfo.h
sortDataObjInfoRandom
int sortDataObjInfoRandom(dataObjInfo_t **dataObjInfoHead)
Definition: dataObjOpr.cpp:701
irods::file_object_ptr
boost::shared_ptr< file_object > file_object_ptr
Definition: irods_file_object.hpp:145
resolveInfoForPhymv
int resolveInfoForPhymv(dataObjInfo_t **dataObjInfoHead, dataObjInfo_t **oldDataObjInfoHead, const std::string &_resc_name, keyValPair_t *condInput, int multiCopyFlag)
Definition: dataObjOpr.cpp:1364
updateDataObjReplStatus
int updateDataObjReplStatus(rsComm_t *rsComm, int l1descInx, int replStatus)
resolveSingleReplCopy
int resolveSingleReplCopy(dataObjInfo_t **dataObjInfoHead, dataObjInfo_t **oldDataObjInfoHead, const std::string &_resc_name, dataObjInfo_t **destDataObjInfo, keyValPair_t *condInput)
Definition: dataObjOpr.cpp:1301
sortObjInfoForRepl
int sortObjInfoForRepl(dataObjInfo_t **dataObjInfoHead, dataObjInfo_t **oldDataObjInfoHead, int deleteOldFlag, const char *resc_hier, const char *dst_resc_hier)
Definition: dataObjOpr.cpp:945
requeDataObjInfoByDestResc
int requeDataObjInfoByDestResc(dataObjInfo_t **dataObjInfoHead, keyValPair_t *condInput, int writeFlag, int topFlag)
Definition: dataObjOpr.cpp:1752
requeDataObjInfoByResc
int requeDataObjInfoByResc(dataObjInfo_t **dataObjInfoHead, const char *preferedResc, int writeFlag, int topFlag)
Definition: dataObjOpr.cpp:760
KeyValPair
Definition: objInfo.h:120
requeDataObjInfoByReplNum
int requeDataObjInfoByReplNum(dataObjInfo_t **dataObjInfoHead, int replNum)
Definition: dataObjOpr.cpp:806
DataObjInfo
Definition: objInfo.h:129
chkCopyInResc
dataObjInfo_t * chkCopyInResc(dataObjInfo_t *&dataObjInfoHead, const std::string &_resc_name, const char *destRescHier)
Definition: dataObjOpr.cpp:842
rods.h
resolveInfoForTrim
int resolveInfoForTrim(dataObjInfo_t **dataObjInfoHead, keyValPair_t *condInput)
Definition: dataObjOpr.cpp:1563
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
irods_linked_list_iterator.hpp
chkOrphanFile
int chkOrphanFile(rsComm_t *rsComm, char *filePath, const char *rescName, dataObjInfo_t *dataObjInfo)
Definition: dataObjOpr.cpp:1099
create_and_sort_data_obj_info_for_open
int create_and_sort_data_obj_info_for_open(const std::string &resc_hier, const irods::file_object_ptr file_obj, dataObjInfo_t **data_obj_info_head)
Definition: dataObjOpr.cpp:610