22 #ifndef GLOBUS_GASS_CACHE_H
23 #define GLOBUS_GASS_CACHE_H
27 #include <sys/param.h>
33 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
46 #define GLOBUS_GASS_CACHE_ADD_NEW 1
47 #define GLOBUS_GASS_CACHE_URL_NOT_FOUND 2
48 #define GLOBUS_GASS_CACHE_ADD_EXISTS 3
50 #define GLOBUS_GASS_CACHE_ERROR_NO_HOME -1
51 #define GLOBUS_GASS_CACHE_ERROR_CAN_NOT_CREATE -2
52 #define GLOBUS_GASS_CACHE_ERROR_NAME_TOO_LONG -3
53 #define GLOBUS_GASS_CACHE_ERROR_LOCK_ERROR -4
55 #define GLOBUS_GASS_CACHE_ERROR_LOCK_TIME_OUT -5
56 #define GLOBUS_GASS_CACHE_ERROR_OPEN_STATE -6
57 #define GLOBUS_GASS_CACHE_ERROR_STATE_F_CORRUPT -7
58 #define GLOBUS_GASS_CACHE_ERROR_NO_MEMORY -8
59 #define GLOBUS_GASS_CACHE_ERROR_CAN_NOT_CREATE_DATA_F -9
61 #define GLOBUS_GASS_CACHE_ERROR_URL_NOT_FOUND -10
62 #define GLOBUS_GASS_CACHE_ERROR_CAN_NOT_DEL_LOCK -11
63 #define GLOBUS_GASS_CACHE_ERROR_WRONG_TAG -12
64 #define GLOBUS_GASS_CACHE_ERROR_ALREADY_DONE -13
65 #define GLOBUS_GASS_CACHE_ERROR_CAN_NOT_WRITE -14
66 #define GLOBUS_GASS_CACHE_ERROR_CAN_NOT_READ -15
67 #define GLOBUS_GASS_CACHE_ERROR_CAN_NOT_DELETE_DATA_F -16
68 #define GLOBUS_GASS_CACHE_ERROR_CACHE_NOT_OPENED -17
69 #define GLOBUS_GASS_CACHE_ERROR_CACHE_ALREADY_OPENED -18
70 #define GLOBUS_GASS_CACHE_ERROR_INVALID_PARRAMETER -19
71 #define GLOBUS_GASS_CACHE_ERROR_INVALID_VERSION -20
72 #define GLOBUS_GASS_CACHE_ERROR_NO_SPACE -21
73 #define GLOBUS_GASS_CACHE_ERROR_QUOTA_EXCEEDED -22
75 #define GLOBUS_GASS_CACHE_TIMESTAMP_UNKNOWN 0UL
91 globus_gass_cache_t* cache_handle);
102 unsigned long *timestamp,
103 char **local_filename);
108 globus_gass_cache_t cache_handle,
111 unsigned long timestamp);
116 globus_gass_cache_t cache_handle,
120 unsigned long *timestamp,
121 char **local_filename,
128 globus_gass_cache_t cache_handle,
131 unsigned long *timestamp);
136 globus_gass_cache_t cache_handle,
139 unsigned long timestamp,
145 globus_gass_cache_t cache_handle,
152 globus_gass_cache_t cache_handle,
200 #define GLOBUS_GASS_CACHE_MODULE (&globus_i_gass_cache_module)
int globus_gass_cache_query(globus_gass_cache_t cache_handle, const char *url, const char *tag, globus_bool_t wait_for_lock, unsigned long *timestamp, char **local_filename, globus_bool_t *is_locked)
Query the GASS Cache.
Definition: globus_gass_cache.c:5641
int globus_gass_cache_cleanup_tag_all(globus_gass_cache_t cache_handle, char *tag)
Remove a tag from all cache entriesRemove all instances of the tag from the cache entry's tag list...
Definition: globus_gass_cache.c:6002
int globus_gass_cache_delete_start(globus_gass_cache_t cache_handle, const char *url, const char *tag, unsigned long *timestamp)
Remove a cache tag.
Definition: globus_gass_cache.c:5741
int globus_gass_cache_add(globus_gass_cache_t cache_handle, const char *url, const char *tag, globus_bool_t create, unsigned long *timestamp, char **local_filename)
Add a tag to an URL in the cache.
Definition: globus_gass_cache.c:5289
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
struct globus_i_gass_cache_t * globus_gass_cache_t
GASS Cache Handle.
Definition: globus_gass_cache.h:85
int globus_gass_cache_get_cache_dir(const globus_gass_cache_t cache_handle, char **cache_dir)
Get the GASS Cache's root directory.
Definition: globus_gass_cache.c:6227
int globus_gass_cache_get_cache_type_string(const globus_gass_cache_t cache_handle, char **cache_type)
Get the type of GASS Cache directory layout.
Definition: globus_gass_cache.c:6403
int globus_gass_cache_get_dirs(const globus_gass_cache_t cache_handle, const char *url, const char *tag, char **global_root, char **local_root, char **tmp_root, char **log_root, char **global_dir, char **local_dir)
Get the set of directories used by a GASS Cache.
Definition: globus_gass_cache.c:6283
int globus_gass_cache_delete(globus_gass_cache_t cache_handle, const char *url, const char *tag, unsigned long timestamp, globus_bool_t is_locked)
Remove one instance of the tag from the cache entry's tag list.
Definition: globus_gass_cache.c:5845
int globus_gass_cache_mangle_tag(const globus_gass_cache_t cache_handle, const char *tag, char **mangled_tag, int *length)
Convert a tag to a string suitable as a file path.
Definition: globus_gass_cache.c:6192
int globus_gass_cache_mangle_url(const globus_gass_cache_t cache_handle, const char *url, char **mangled_url, int *length)
Convert a URL to a string suitable as a file path.
Definition: globus_gass_cache.c:6148
int globus_gass_cache_open(const char *cache_directory_path, globus_gass_cache_t *cache_handlep)
Open a GASS Cache.
Definition: globus_gass_cache.c:4669
int globus_gass_cache_close(globus_gass_cache_t *cache_handlep)
Close a cache handle.
Definition: globus_gass_cache.c:5161
Headers common to all of Globus.
int globus_gass_cache_cleanup_tag(globus_gass_cache_t cache_handle, const char *url, const char *tag)
Remove a tag from a cache entry.
Definition: globus_gass_cache.c:5925
int globus_gass_cache_add_done(globus_gass_cache_t cache_handle, const char *url, const char *tag, unsigned long timestamp)
Complete adding a cache entry and unlock it.
Definition: globus_gass_cache.c:5545
Module Descriptor.
Definition: globus_module.h:71
const char * globus_gass_cache_error_string(int error_code)
Look up the error string corresponding to a GASS Cache error.
Definition: globus_gass_cache.c:6442