16 #include "gtest/gtest_prod.h"
47 virtual int64_t
Write(
const void *buf, uint64_t sz) {
79 virtual int Flush() {
return 0; }
80 virtual bool Reserve(
size_t ) {
return true; }
87 std::string result =
"Transaction sink that is ";
88 result +=
IsValid() ?
"valid" :
"invalid";
122 const std::string &alt_url =
"");
202 #endif // CVMFS_FETCH_H_
void CleanupTls(ThreadLocalStorage *tls)
friend void TLSDestructor(void *data)
virtual int64_t Write(const void *buf, uint64_t sz)
Fetcher(CacheManager *cache_mgr, download::DownloadManager *download_mgr, BackoffThrottle *backoff_throttle, perf::StatisticsTemplate statistics)
BackoffThrottle * backoff_throttle_
std::map< shash::Any, std::vector< int > * > ThreadQueues
ThreadLocalStorage * GetTls()
download::DownloadManager * download_mgr()
perf::Counter * n_invocations
CacheManager * cache_mgr_
ThreadQueues queues_download_
CacheManager * cache_mgr()
virtual bool Reserve(size_t)
std::vector< ThreadLocalStorage * > tls_blocks_
std::vector< int > other_pipes_waiting
pthread_mutex_t * lock_tls_blocks_
pthread_mutex_t * lock_queues_download_
CacheManager * cache_mgr_
TransactionSink(CacheManager *cache_mgr, void *open_txn)
int Fetch(const CacheManager::LabeledObject &object, const std::string &alt_url="")
int OpenSelect(const CacheManager::LabeledObject &object)
download::DownloadManager * download_mgr_
virtual bool RequiresReserve()
void ReplaceCacheManager(CacheManager *new_cache_mgr)
virtual ~TransactionSink()
void SignalWaitingThreads(const int fd, const shash::Any &id, ThreadLocalStorage *tls)
FRIEND_TEST(T_Fetcher, GetTls)
virtual int Reset(void *txn)=0
download::JobInfo download_job
friend void * TestFetchCollapse2(void *data)
friend void * TestGetTls(void *data)
perf::Counter * n_downloads
virtual std::string Describe()
pthread_key_t thread_local_storage_
friend void * TestFetchCollapse(void *data)
virtual int64_t Write(const void *buf, uint64_t sz, void *txn)=0