Class OpenVDS::GlobalState
-
class GlobalState
Object that contains global runtime data.
Public Functions
-
virtual uint64_t GetBytesDownloaded(OpenOptions::ConnectionType connectionType) = 0
Get the global amount of downloaded bytes from a cloud vendor.
- Parameters:
connectionType – The counter to be retireved.
- Returns:
Global number of bytes downloaded from the connection. This does not include any http header data.
-
virtual uint64_t GetChunksDownloaded(OpenOptions::ConnectionType connectionType) = 0
Get the global count of downloaded chunks.
- Parameters:
connectionType – The counter to be retireved.
- Returns:
Number of chunks downloaded.
-
virtual uint64_t GetBytesDecompressed(OpenOptions::ConnectionType connectionType) = 0
Get the global amount of decompressed bytes. This amount might be smaller than the amount of downloaded bytes because of a small header pr chunk. It can also be larger for non compressed data sets since chunks can be cached.
- Parameters:
connectionType –
- Returns:
Amount of decompressed bytes served the process.
-
virtual uint64_t GetChunksDecompressed(OpenOptions::ConnectionType connectionType) = 0
Get the global count of decompressed chunks.
- Parameters:
connectionType – The counter to be retireved.
- Returns:
Number of chunks decompressed.
-
virtual void SetLogCallback(LogCallback callback, void *userHandle) = 0
Set the log callback used to receive log messages from OpenVDS. It is safe to set the LogCallback before any other OpenVDS function is called.
- Parameters:
callback – The function pointer to the callback.
userHandle – This is the pointer that will be passed into the callback functions userHandle parameter.
-
virtual void SetDefaultLogCallback() = 0
Set the default LogCallback This function sets the default logging interface that will print trace and info to stdout. It will print Warning and Error to the stderr file stream.
-
virtual uint64_t GetBytesDownloaded(OpenOptions::ConnectionType connectionType) = 0