LoadBundleTaskProgress

public final class LoadBundleTaskProgress


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

Summary

Nested types

Represents the state of bundle loading tasks.

Public methods

boolean
long

Returns how many bytes have been loaded.

int

Returns how many documents have been loaded.

@Nullable Exception

If the LoadBundleTask failed, returns the exception.

@NonNull LoadBundleTaskProgress.TaskState

Returns the current state of the LoadBundleTask.

long

Returns the total number of bytes in the bundle.

int

Returns the total number of documents in the bundle.

int

Public fields

bytesLoaded

public final long bytesLoaded

documentsLoaded

public final int documentsLoaded

exception

public final @Nullable Exception exception

totalBytes

public final long totalBytes

totalDocuments

public final int totalDocuments

Public methods

equals

public boolean equals(Object o)

getBytesLoaded

public long getBytesLoaded()

Returns how many bytes have been loaded.

getDocumentsLoaded

public int getDocumentsLoaded()

Returns how many documents have been loaded.

getException

public @Nullable Exception getException()

If the LoadBundleTask failed, returns the exception. Otherwise, returns null.

getTaskState

public @NonNull LoadBundleTaskProgress.TaskState getTaskState()

Returns the current state of the LoadBundleTask.

getTotalBytes

public long getTotalBytes()

Returns the total number of bytes in the bundle. Returns 0 if the bundle failed to parse.

getTotalDocuments

public int getTotalDocuments()

Returns the total number of documents in the bundle. Returns 0 if the bundle failed to parse.

hashCode

public int hashCode()