Package io.realm
Interface RealmAsyncTask
-
- All Known Subinterfaces:
RealmEventStreamAsyncTask<T>,RealmEventStreamTask<T>,RealmResultTask<T>
public interface RealmAsyncTaskRepresents a pending asynchronous Realm task, like asynchronous transactions.Users are responsible for maintaining a reference to
RealmAsyncTaskin order to callcancel()in case of a configuration change for example (to avoid memory leak, as the transaction will post the result to the caller's thread callback).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel()Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled).booleanisCancelled()Checks whether an attempt to cancel the transaction was performed.
-
-
-
Method Detail
-
cancel
void cancel()
Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled).
-
isCancelled
boolean isCancelled()
Checks whether an attempt to cancel the transaction was performed.- Returns:
trueifcancel()has already been called,falseotherwise.
-
-