public abstract class ReadTask
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReadTask.Continuation
An object representing the action that should be done on Swing thread after the background computation is finished.
|
| Constructor and Description |
|---|
ReadTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeInReadAction(ProgressIndicator indicator)
Performs the computation.
|
abstract void |
onCanceled(ProgressIndicator indicator)
Is invoked on Swing thread whenever the computation is canceled by a write action.
|
ReadTask.Continuation |
performInReadAction(ProgressIndicator indicator)
Performs the computation.
|
ReadTask.Continuation |
runBackgroundProcess(ProgressIndicator indicator)
Is invoked on a background thread.
|
public void computeInReadAction(ProgressIndicator indicator) throws ProcessCanceledException
performInReadAction(ProgressIndicator) insteadProcessCanceledExceptionpublic ReadTask.Continuation performInReadAction(ProgressIndicator indicator) throws ProcessCanceledException
ProcessCanceledExceptionpublic abstract void onCanceled(ProgressIndicator indicator)
public ReadTask.Continuation runBackgroundProcess(ProgressIndicator indicator) throws ProcessCanceledException
computeInReadAction(ProgressIndicator). Overriders might also do something else.
For example, use DumbService.runReadActionInSmartMode(Runnable).indicator - the progress indicator of the background threadProcessCanceledException