#include <load_bundle_task_progress.h>

Represents a progress update or the final state from loading bundles.

Summary

Constructors and Destructors

LoadBundleTaskProgress()
LoadBundleTaskProgress(int32_t documents_loaded, int32_t total_documents, int64_t bytes_loaded, int64_t total_bytes, State state)

Construct a LoadBundleTaskProgress with specific state.

Public types

State enum

Represents the state of bundle loading tasks.

Public functions

bytes_loaded() const

int64_t

Returns how many bytes have been loaded.

documents_loaded() const

int32_t

Returns how many documents have been loaded.

state() const

Returns the current state of the loading progress.

total_bytes() const

int64_t

Returns the total number of bytes in the bundle.

total_documents() const

int32_t

Returns the total number of documents in the bundle.

Public types

State

 State

Represents the state of bundle loading tasks.

Both kSuccess and kError are final states: the task will abort or complete and there will be no more updates after they are reported.

Public functions

LoadBundleTaskProgress

 LoadBundleTaskProgress()=default

LoadBundleTaskProgress

 LoadBundleTaskProgress(
  int32_t documents_loaded,
  int32_t total_documents,
  int64_t bytes_loaded,
  int64_t total_bytes,
  State state
)

bytes_loaded

int64_t bytes_loaded() const 

Returns how many bytes have been loaded.

documents_loaded

int32_t documents_loaded() const 

Returns how many documents have been loaded.

state

State state() const 

Returns the current state of the loading progress.

total_bytes

int64_t total_bytes() const 

Returns the total number of bytes in the bundle.

Returns 0 if the bundle failed to parse.

total_documents

int32_t total_documents() const 

Returns the total number of documents in the bundle.

Returns 0 if the bundle failed to parse.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-01-23 UTC.