Class Progress
On this page
io.realm.mongodb.sync
Class used to encapsulate progress notifications when either downloading or uploading Realm data. Each instance of this class is an immutable snapshot of the current progress.If the ProgressListener was registered with ProgressMode.INDEFINITELY , the progress reported by getFractionTransferred() can both increase and decrease since more changes might be added while the progres listener is registered. This means it is possible for one notification to report true
for isTransferComplete() , and then on the next event report false
.
If the ProgressListener was registered with ProgressMode.CURRENT_CHANGES , progress can only ever increase, and once isTransferComplete() returns true
, no further events will be generated.
Method Summary
Modifier and Type | Method and Description |
---|---|
public boolean | |
public double | The fraction of bytes transferred out of all transferable bytes. |
public long | Returns the total number of transferable bytes (bytes that have been transferred + bytes pending transfer). |
public long | Returns the total number of bytes that has been transferred since the ProgressListener was added. |
public int | hashCode () |
public boolean | Returns |
public String | toString () |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass
,hashCode
,equals
,clone
,toString
,notify
,notifyAll
,wait
,wait
,wait
,finalize
Method Detail
equals
getFractionTransferred
public double getFractionTransferred () |
---|
The fraction of bytes transferred out of all transferable bytes. Counting from since the ProgressListener was added. Returns a number between |
getTransferableBytes
public long getTransferableBytes () |
---|
Returns the total number of transferable bytes (bytes that have been transferred + bytes pending transfer).If the ProgressListener is tracking downloads, this number represents the size of the changesets generated by all other clients using the Realm. If the ProgressListener is tracking uploads, this number represents the size of changesets created locally. Returns the total number of bytes that has been transferred + number of bytes still pending transfer. |
getTransferredBytes
public long getTransferredBytes () |
---|
Returns the total number of bytes that has been transferred since the ProgressListener was added. Returns the total number of bytes transferred since the ProgressListener was added. |
hashCode
isTransferComplete
public boolean isTransferComplete () |
---|
Returns If the ProgressListener was registered with ProgressMode.INDEFINITELY , this method can return If the ProgressListener was registered with ProgressMode.CURRENT_CHANGES , when this method returns Returns
|