Package io.realm.mongodb
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 ofRealmAsyncTaskthat 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Blocks the thread on which the call is made until the result of the operation arrives.voidgetAsync(App.Callback<T> callback)Provides a way to subscribe to asynchronous operations via a callback, which handles both results and errors.-
Methods inherited from interface io.realm.RealmAsyncTask
cancel, isCancelled
-
-
-
-
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- theApp.Callbackdesigned to receive results.- Throws:
IllegalStateException- if called from a thread without aLooperor from anIntentServicethread.
-
-