Docs Menu

Interface RealmAsyncTask

On this page

  • io.realm
  • Method Summary
  • Method Detail
  • cancel
  • isCancelled

Represents a pending asynchronous Realm task, like asynchronous transactions.Users are responsible for maintaining a reference to RealmAsyncTask in order to call cancel() 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).

Modifier and Type
Method and Description
public void

Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled).

public boolean

Checks whether an attempt to cancel the transaction was performed.

public void cancel ()

Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled).
public boolean isCancelled ()

Checks whether an attempt to cancel the transaction was performed.

Returns

true if cancel() has already been called, false otherwise.

←  Class RealmAnyOperatorInterface RealmChangeListener →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.