Package io.realm
Interface RealmAsyncTask
-
- All Known Subinterfaces:
RealmEventStreamAsyncTask<T>
,RealmEventStreamTask<T>
,RealmResultTask<T>
public interface RealmAsyncTask
Represents a pending asynchronous Realm task, like asynchronous transactions.Users are responsible for maintaining a reference to
RealmAsyncTask
in 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 void
cancel()
Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled).boolean
isCancelled()
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:
true
ifcancel()
has already been called,false
otherwise.
-
-