Interface RealmResultTask<T>

  • Type Parameters:
    T - the result type delivered by this task.
    All Superinterfaces:
    RealmAsyncTask

    public interface RealmResultTask<T>
    extends RealmAsyncTask
    The RealmResultTask is a specific version of RealmAsyncTask that provides a mechanism to work with asynchronous operations carried out against MongoDB Realm that yield a result.

    This class offers both blocking (get) and non-blocking (getAsync) method calls.

    • Method Detail

      • get

        T get()
        Blocks the thread on which the call is made until the result of the operation arrives.
        Returns:
        the result of the operation executed by this task.
      • getAsync

        void getAsync​(App.Callback<T> callback)
        Provides a way to subscribe to asynchronous operations via a callback, which handles both results and errors.
        Parameters:
        callback - the App.Callback designed to receive results.
        Throws:
        IllegalStateException - if called from a thread without a Looper or from an IntentService thread.