public interface ResourceTask extends SagaObject, Monitorable
Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_STATE
Metric name: fires on resource state change, and has the literal value of the
resource state enumeration.
|
static String |
RESOURCE_STATEDETAIL
Metric name: fires as a resource changes its state detail.
|
NO_WAIT, WAIT_FOREVER
Modifier and Type | Method and Description |
---|---|
State |
getState()
Gets the state of the resource
|
void |
waitFor()
Waits for the resource end up in a final state.
|
void |
waitFor(float timeoutInSeconds)
Waits for the task to end up in a final state.
|
void |
waitFor(float timeoutInSeconds,
State state)
Waits for the task to end up in specified state.
|
void |
waitFor(State state)
Waits for the task to end up in specified state.
|
clone, getId, getSession
addCallback, getMetric, listMetrics, removeCallback
static final String RESOURCE_STATE
static final String RESOURCE_STATEDETAIL
State getState() throws NotImplementedException, TimeoutException, NoSuccessException
NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.void waitFor() throws NotImplementedException, IncorrectStateException, TimeoutException, NoSuccessException
wait
, for Java the name needs to be
changed slightly.NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out.IncorrectStateException
- is thrown when the task is in NEW state.NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.void waitFor(float timeoutInSeconds) throws NotImplementedException, IncorrectStateException, TimeoutException, NoSuccessException
wait
, for Java the name needs
to be changed slightly.timeoutInSeconds
- maximum number of seconds to wait.NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out. Note that this is not thrown when the specified timeout expires.
In that case, false
is returned.IncorrectStateException
- is thrown when the task is in NEW state.NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.void waitFor(State state) throws NotImplementedException, IncorrectStateException, TimeoutException, NoSuccessException
wait
, for Java the name needs
to be changed slightly.state
- the state to wait for.NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out. Note that this is not thrown when the specified timeout expires.
In that case, false
is returned.IncorrectStateException
- is thrown when the task is in NEW state.NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.void waitFor(float timeoutInSeconds, State state) throws NotImplementedException, IncorrectStateException, TimeoutException, NoSuccessException
wait
, for Java the name needs
to be changed slightly.timeoutInSeconds
- maximum number of seconds to wait.state
- the state to wait for.NotImplementedException
- is thrown if the implementation does not provide an
implementation of this method.TimeoutException
- is thrown when a remote operation did not complete successfully
because the network communication or the remote service timed
out. Note that this is not thrown when the specified timeout expires.
In that case, false
is returned.IncorrectStateException
- is thrown when the task is in NEW state.NoSuccessException
- is thrown when the operation was not successfully performed,
and none of the other exceptions apply.Copyright © 2016 Open Grid Forum. All rights reserved.