public class ComponentSuspendable extends Object implements ISuspendable
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<ComponentSuspendable> |
COMSUPS
The component suspendables.
|
SUSPENDABLE
Constructor and Description |
---|
ComponentSuspendable(IComponentAdapter adapter)
Create a component suspendable.
|
Modifier and Type | Method and Description |
---|---|
Future<?> |
getFuture()
Get the future.
|
Object |
getMonitor()
Get the monitor for waiting.
|
void |
resume(Future<?> future)
Resume the execution of the suspendable.
|
void |
suspend(Future<?> future,
long timeout)
Suspend the execution of the suspendable.
|
public static final ThreadLocal<ComponentSuspendable> COMSUPS
public ComponentSuspendable(IComponentAdapter adapter)
public void suspend(Future<?> future, long timeout)
suspend
in interface ISuspendable
future
- The future to wait for.timeout
- The timeout.public void resume(Future<?> future)
resume
in interface ISuspendable
future
- The future that issues the resume.public Object getMonitor()
getMonitor
in interface ISuspendable
public Future<?> getFuture()
Copyright © 2013. All Rights Reserved.