public class ManagementOperation<R> extends FutureTask<R>
ManagementOperation
is a background task, which can be
executed by an Executor
. Its ManagementOperation.Status
indicates
whether execution has already been started, is currently under the
way or has already finished.RepositoryManagementMBean
Modifier and Type | Class and Description |
---|---|
static class |
ManagementOperation.Status
Status of a
ManagementOperation . |
Modifier and Type | Method and Description |
---|---|
static <R> ManagementOperation<R> |
done(String name,
R result)
An operation that is already done with the given
value . |
int |
getId()
Each instance of a
ManagementOperation has an unique id
associated with it. |
String |
getName()
Informal name
|
ManagementOperation.Status |
getStatus()
|
static <R> ManagementOperation<R> |
newManagementOperation(String name,
Callable<R> task)
Create a new
ManagementOperation of the given name. |
String |
toString() |
cancel, get, get, isCancelled, isDone, run
public static <R> ManagementOperation<R> newManagementOperation(String name, Callable<R> task)
ManagementOperation
of the given name. The name
is an informal value attached to this instance.name
- informal nametask
- task to execute for this operationpublic static <R> ManagementOperation<R> done(String name, R result)
value
.name
- name of the operationresult
- result returned by the operationManagementOperation
instance that is already done.public int getId()
ManagementOperation
has an unique id
associated with it. This id is returned as a part of its
status
public String getName()
public ManagementOperation.Status getStatus()
status
of this operation:
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"