Class Progress

    • Method Detail

      • 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.
      • 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.
      • 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 0.0 and 1.0, where 0.0 represents that no data has been transferred yet, and 1.0 that all data has been transferred.
      • isTransferComplete

        public boolean isTransferComplete()
        Returns true when all pending bytes have been transferred.

        If the ProgressListener was registered with ProgressMode.INDEFINITELY, this method can return false for subsequent events after returning true.

        If the ProgressListener was registered with ProgressMode.CURRENT_CHANGES, when this method returns true, no more progress events will be sent.

        Returns:
        true if all changes have been transferred, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object