17 #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
26 #define GLOBUS_L_GASS_CACHE_DEFAULT_DIR_ENV_VAR "GLOBUS_GASS_CACHE_DEFAULT"
27 #define GLOBUS_L_GASS_CACHE_DEBUG "GLOBUS_GASS_CACHE_DEBUG"
34 #define GLOBUS_L_DOT_GLOBUS_DIR_NAME "/.globus"
35 #define GLOBUS_L_GASS_CACHE_DEFAULT_DIR_NAME "/.gass_cache"
36 #define GLOBUS_L_GASS_CACHE_GLOBAL_DIR "global"
37 #define GLOBUS_L_GASS_CACHE_LOCAL_DIR "local"
38 #define GLOBUS_L_GASS_CACHE_TMP_DIR "tmp"
39 #define GLOBUS_L_GASS_CACHE_LOG_DIR "log"
43 #define GLOBUS_L_GASS_CACHE_MODE_RWX (_S_IRWXU)
44 #define GLOBUS_L_GASS_CACHE_MODE_RW (_S_IRUSR|_S_IWUSR)
46 #define GLOBUS_L_GASS_CACHE_MODE_RWX \
47 (S_IRWXU|S_IRWXG|S_IRWXO)
48 #define GLOBUS_L_GASS_CACHE_MODE_RW \
49 (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
51 #define GLOBUS_L_GASS_CACHE_DIR_MODE GLOBUS_L_GASS_CACHE_MODE_RWX
52 #define GLOBUS_L_GASS_CACHE_DATAFILE_MODE GLOBUS_L_GASS_CACHE_MODE_RWX
53 #define GLOBUS_L_GASS_CACHE_UNIQFILE_MODE GLOBUS_L_GASS_CACHE_MODE_RWX
54 #define GLOBUS_L_GASS_CACHE_URLFILE_MODE GLOBUS_L_GASS_CACHE_MODE_RW
55 #define GLOBUS_L_GASS_CACHE_TAGFILE_MODE GLOBUS_L_GASS_CACHE_MODE_RW
56 #define GLOBUS_L_GASS_CACHE_SKEWFILE_MODE GLOBUS_L_GASS_CACHE_MODE_RW
59 #define LOCK_SLEEP_USEC 500000
62 #define DATA_FILE "data"
63 #define DATA_FILE_PAT "data"
64 #define DATA_FILE_PAT_LEN 4
65 #define UDATA_FILE "data."
66 #define UDATA_FILE_PAT "data."
67 #define UDATA_FILE_PAT_LEN 5
68 #define LOCK_FILE "lock"
69 #define URL_FILE "url"
70 #define TAG_FILE "tag"
71 #define UNIQ_NAME_FORMAT "%s_%lx_%lx"
72 #define UNIQ_NAME_MAX (20 + MAXHOSTNAMELEN)
74 #define MAX_FILENAME_LEN ( DATA_FILE_PAT_LEN + UNIQ_NAME_MAX )
77 #define LOCK_MAX_SECONDS 30
78 #define LOCK_SLEEP_USEC 500000
79 #define NOTREADY_MAX_SECONDS 300
80 #define NOTREADY_CHECK_SECONDS 10
81 #define SKEWCALC_SECONDS 3600
82 #define EBUSY_SLEEP_USEC 10000
90 #define LINKBUG_SLEEP_USEC 50000
91 #define LINKBUG_MAX_RETRY 100
96 #define MAKE_DIRTREE_MAX_TRIES 100
97 #define UNLINK_MAX_TRIES 20
98 #define CREATE_MAX_TRIES 20
107 #define LOCK_TOUT 600
109 #define GLOBUS_L_GASS_CACHE_NULL_TAG "null"
119 #define CACHE_TRACE(_f_)\
120 globus_l_gass_cache_trace(__FILE__,__LINE__, (_f_) )
121 #define CACHE_TRACE2(_f_,_a1_)\
122 globus_l_gass_cache_trace(__FILE__,__LINE__, (_f_),(_a1_) )
123 #define CACHE_TRACE3(_f_,_a1_,_a2_)\
124 globus_l_gass_cache_trace(__FILE__,__LINE__, (_f_),(_a1_),(_a2_) )
125 #define CACHE_TRACE4(_f_,_a1_,_a2_,_a3_)\
126 globus_l_gass_cache_trace(__FILE__,__LINE__,\
127 (_f_),(_a1_),(_a2_),(_a3_) )
128 #define CACHE_TRACE5(_f_,_a1_,_a2_,_a3_,_a4_)\
129 globus_l_gass_cache_trace(__FILE__,__LINE__,\
130 (_f_),(_a1_),(_a2_),(_a3_),(_a4_) )
132 #ifdef GLOBUS_L_GASS_CACHE_LOG
133 #define GLOBUS_L_GASS_CACHE_LG(_f_)\
134 globus_l_gass_cache_trace(__FILE__,__LINE__, (_f_) );\
135 globus_l_gass_cache_log(cache_handle->log_FILE, (_f_) )
136 #define GLOBUS_L_GASS_CACHE_LG2(_f_,_a1_)\
137 globus_l_gass_cache_trace(__FILE__,__LINE__, (_f_),(_a1_) );\
138 globus_l_gass_cache_log(cache_handle->log_FILE, (_f_),(_a1_) )
139 #define GLOBUS_L_GASS_CACHE_LG3(_f_,_a1_,_a2_)\
140 globus_l_gass_cache_trace(__FILE__,__LINE__, (_f_),(_a1_),(_a2_) );\
141 globus_l_gass_cache_log(cache_handle->log_FILE, (_f_),(_a1_),(_a2_) )
142 #define GLOBUS_L_GASS_CACHE_LG4(_f_,_a1_,_a2_,_a3_)\
143 globus_l_gass_cache_trace(__FILE__,__LINE__,(_f_),(_a1_),(_a2_),(_a3_) );\
144 globus_l_gass_cache_log(cache_handle->log_FILE,(_f_),(_a1_),(_a2_),(_a3_) )
147 #define GLOBUS_L_GASS_CACHE_LG(_f_)
148 #define GLOBUS_L_GASS_CACHE_LG2(_f_,_a1_)
149 #define GLOBUS_L_GASS_CACHE_LG3(_f_,_a1_,_a2_)
150 #define GLOBUS_L_GASS_CACHE_LG4(_f_,_a1_,_a2_,_a3_)
155 #define CACHE_TRACE(_f_)
156 #define CACHE_TRACE2(_f_,_a1_)
157 #define CACHE_TRACE3(_f_,_a1_,_a2_)
158 #define CACHE_TRACE4(_f_,_a1_,_a2_,_a3_)
159 #define CACHE_TRACE5(_f_,_a1_,_a2_,_a3_,_a4_)
160 #ifdef GLOBUS_L_GASS_CACHE_LOG
161 #define GLOBUS_L_GASS_CACHE_LG(_f_)\
162 globus_l_gass_cache_log(cache_handle->log_FILE, _f_ );
163 #define GLOBUS_L_GASS_CACHE_LG2(_f_,_a1_)\
164 globus_l_gass_cache_log(cache_handle->log_FILE, (_f_),(_a1_) );
165 #define GLOBUS_L_GASS_CACHE_LG3(_f_,_a1_,_a2_)\
166 globus_l_gass_cache_log(cache_handle->log_FILE,\
167 (_f_),(_a1_),(_a2_) );
168 #define GLOBUS_L_GASS_CACHE_LG4(_f_,_a1_,_a2_,_a3_)\
169 globus_l_gass_cache_log(cache_handle->log_FILE,\
170 (_f_),(_a1_),(_a2_),(_a3_) );
172 #define GLOBUS_L_GASS_CACHE_LG(_f_)
173 #define GLOBUS_L_GASS_CACHE_LG2(_f_,_a1_)
174 #define GLOBUS_L_GASS_CACHE_LG3(_f_,_a1_,_a2_)
175 #define GLOBUS_L_GASS_CACHE_LG4(_f_,_a1_,_a2_,_a3_)
178 typedef struct globus_i_gass_cache_t
184 char *cache_directory_path;
185 char *global_directory_path;
186 char *local_directory_path;
187 char *tmp_directory_path;
199 unsigned mangling_options;
205 int directory_levels;
211 globus_i_gass_cache_t;
Lightweight Chaining Symboltable.