mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Adds javadoc to ProcessHandler's abstract methods.
close #1277 GitOrigin-RevId: 5a3818898f759d9313a532163e281c2394de5daf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6ab0a7a2cf
commit
3f557092b6
@@ -61,8 +61,26 @@ public abstract class ProcessHandler extends UserDataHolderBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs process destruction.
|
||||
*
|
||||
* <p>This is an internal implementation of {@link #destroyProcess}. All sub-classes must implement this method and perform the
|
||||
* destruction in this method. This method is called from {@link #destroyProcess} and it can be in any thread including the
|
||||
* event dispatcher thread. You should avoid doing any expensive operation directly in this method. Instead, you may post the work to
|
||||
* background thread and return without waiting for it. Once the destruction is completed, you must call {@link #notifyProcessTerminated}
|
||||
* to move the process handler's state to terminated.
|
||||
*/
|
||||
protected abstract void destroyProcessImpl();
|
||||
|
||||
/**
|
||||
* Performs detaching process.
|
||||
*
|
||||
* <p>This is an internal implementation of {@link #detachProcess}. All sub-classes must implement this method and perform the
|
||||
* detaching in this method. This method is called from {@link #detachProcess} and it can be in any thread including the
|
||||
* event dispatcher thread. You should avoid doing any expensive operation directly in this method. Instead, you may post the work to
|
||||
* background thread and return without waiting for it. Once the detaching is completed, you must call {@link #notifyProcessDetached}
|
||||
* to move the process handler's state to terminated.
|
||||
*/
|
||||
protected abstract void detachProcessImpl();
|
||||
|
||||
public abstract boolean detachIsDefault();
|
||||
@@ -91,6 +109,12 @@ public abstract class ProcessHandler extends UserDataHolderBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys a process asynchronously.
|
||||
*
|
||||
* <p>It changes the process handler's state and {@link #isProcessTerminating} becomes true. This method may return without waiting for
|
||||
* the process termination. Upon the completion of the process termination, {@link #isProcessTerminated} becomes true.
|
||||
*/
|
||||
public void destroyProcess() {
|
||||
myAfterStartNotifiedRunner.execute(() -> {
|
||||
if (myState.compareAndSet(State.RUNNING, State.TERMINATING)) {
|
||||
@@ -100,6 +124,12 @@ public abstract class ProcessHandler extends UserDataHolderBase {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches a process asynchronously.
|
||||
*
|
||||
* <p>It changes the process handler's state and {@link #isProcessTerminating} becomes true. This method may return without waiting for
|
||||
* detaching the process. Upon the completion of the detaching, {@link #isProcessTerminated} becomes true.
|
||||
*/
|
||||
public void detachProcess() {
|
||||
myAfterStartNotifiedRunner.execute(() -> {
|
||||
if (myState.compareAndSet(State.RUNNING, State.TERMINATING)) {
|
||||
|
||||
Reference in New Issue
Block a user