17 #ifndef DEFAULTLOGUPLOADCONFIGURATION_HPP_
18 #define DEFAULTLOGUPLOADCONFIGURATION_HPP_
22 #ifdef KAA_USE_LOGGING
29 class DefaultLogUploadConfiguration :
public ILogUploadConfiguration {
31 DefaultLogUploadConfiguration()
32 : blockSize_(DEFAULT_BLOCK_SIZE)
33 , maxStorageVolume_(DEFAULT_MAX_STORAGE_VOLUME)
34 , volumeThreshold_(DEFAULT_VOLUME_THRESHOLD) {}
36 DefaultLogUploadConfiguration(
size_t blockSize,
size_t maxStorageVolume,
size_t volumeThreshold)
37 : blockSize_(blockSize)
38 , maxStorageVolume_(maxStorageVolume)
39 , volumeThreshold_(volumeThreshold) {}
41 std::size_t getBlockSize()
const {
return blockSize_; }
42 std::size_t getMaxStorageVolume()
const {
return maxStorageVolume_; }
43 std::size_t getVolumeThreshold()
const {
return volumeThreshold_; }
46 std::size_t blockSize_;
47 std::size_t maxStorageVolume_;
48 std::size_t volumeThreshold_;
50 static const std::size_t DEFAULT_BLOCK_SIZE = 8192;
51 static const std::size_t DEFAULT_MAX_STORAGE_VOLUME = 1024*1024;
52 static const std::size_t DEFAULT_VOLUME_THRESHOLD = DEFAULT_BLOCK_SIZE * 4;