5 #ifndef CVMFS_INGESTION_ITEM_H_
6 #define CVMFS_INGESTION_ITEM_H_
25 struct UploadStreamHandle;
38 uint64_t min_chunk_size = 4 * 1024 * 1024,
39 uint64_t avg_chunk_size = 8 * 1024 * 1024,
40 uint64_t max_chunk_size = 16 * 1024 * 1024,
77 ssize_t
Read(
void *buffer,
size_t nbyte) {
78 return source_->Read(buffer, nbyte);
208 uint32_t
Write(
void *buf, uint32_t count);
258 #endif // CVMFS_INGESTION_ITEM_H_
const bool has_legacy_bulk_chunk_
const unsigned kMaxContextSize
void RegisterChunk(const FileChunk &file_chunk)
void MakeDataMove(BlockItem *other)
void set_is_fully_chunked()
bool GetSize(uint64_t *size)
shash::ContextPtr hash_ctx_
void SetChunkItem(ChunkItem *item)
FileItem(IngestionSource *source, uint64_t min_chunk_size=4 *1024 *1024, uint64_t avg_chunk_size=8 *1024 *1024, uint64_t max_chunk_size=16 *1024 *1024, zlib::Algorithms compression_algorithm=zlib::kZlibDefault, shash::Algorithms hash_algorithm=shash::kSha1, shash::Suffix hash_suffix=shash::kSuffixNone, bool may_have_chunks=true, bool has_legacy_bulk_chunk=false)
shash::Algorithms hash_algorithm()
unsigned char hash_ctx_buffer_[shash::kMaxContextSize]
zlib::Compressor * GetCompressor()
BlockItem(ItemAllocator *allocator)
assert((mem||(size==0))&&"Out Of Memory")
void SetFileItem(FileItem *item)
Xor32Detector * chunk_detector()
void set_size(uint64_t val)
ChunkItem(FileItem *file_item, uint64_t offset)
void set_size(uint64_t val)
Xor32Detector chunk_detector_
upload::UploadStreamHandle * upload_handle_
FileChunkList * GetChunksPtr()
const shash::Suffix hash_suffix_
uint64_t nchunks_in_fly()
static FileItem * CreateQuitBeacon()
void set_size(uint32_t val)
const shash::Algorithms hash_algorithm_
upload::UploadStreamHandle * upload_handle()
bool has_legacy_bulk_chunk()
void set_may_have_chunks(bool val)
const zlib::Algorithms compression_algorithm_
void MakeData(uint32_t capacity)
UniquePtr< IngestionSource > source_
atomic_int64 nchunks_in_fly_
shash::ContextPtr hash_ctx()
shash::Suffix hash_suffix()
static atomic_int64 managed_bytes_
zlib::Algorithms compression_algorithm()
static const uint64_t kSizeUnknown
ItemAllocator * allocator_
atomic_int32 is_fully_chunked_
void set_upload_handle(upload::UploadStreamHandle *val)
static BlockItem * CreateQuitBeacon()
ssize_t Read(void *buffer, size_t nbyte)
void MakeDataCopy(const unsigned char *data, uint32_t size)
uint32_t Write(void *buf, uint32_t count)
static const char kQuitBeaconMarker
UniquePtr< zlib::Compressor > compressor_
static uint64_t managed_bytes()