|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Timeout
A specific scheduler for executing timeout commands.
| Method Summary | |
|---|---|
Future |
close(Closeable target,
long timeout,
boolean interrupt)
Closes the given closeable after a timeout. |
Future |
close(ServerSocket socket,
long timeout,
boolean interrupt)
Closes the given server socket after a timeout. |
Future |
close(Socket socket,
long timeout,
boolean interrupt)
Closes the given socket after a timeout. |
Future |
execute(Callable command,
long timeout)
Executes the given callable command after a timeout. |
Future |
execute(Runnable command,
long timeout)
Executes the given command after a timeout. |
ObjectName |
getExecutorName()
Gets the the executor of this timeout. |
ObjectName |
getThreadFactoryName()
Gets the thread factory of this timeout. |
boolean |
isLoggingEnabled()
Checks whether timeout logging of this scheduler is enabled. |
void |
setExecutorName(ObjectName executor)
Sets the executor of this timeout. |
void |
setLoggingEnabled(boolean flag)
Sets whether timoeut logging of this scheduler is enabled. |
void |
setThreadFactoryName(ObjectName factory)
Sets the thread factory of this timeout. |
| Methods inherited from interface org.norther.tammi.core.base.Startable |
|---|
isStarted, start, stop |
| Method Detail |
|---|
boolean isLoggingEnabled()
void setLoggingEnabled(boolean flag)
flag - true if logging is enabled, false otherwise.ObjectName getThreadFactoryName()
void setThreadFactoryName(ObjectName factory)
factory - the name of the factory or a query.ObjectName getExecutorName()
void setExecutorName(ObjectName executor)
executor - the object name of the executor or a query.
Future execute(Runnable command,
long timeout)
command - the runnable to execute.timeout - the timeout in msecs.
NullPointerException - for missing resources.
IllegalStateException - if not registered and started.
Future execute(Callable command,
long timeout)
command - the callable to execute.timeout - the timeout in msecs.
NullPointerException - for missing resources.
IllegalStateException - if not registered and started.
Future close(ServerSocket socket,
long timeout,
boolean interrupt)
socket - the socket to close.timeout - the timeout in msecs.interrupt - interrupt this thread before closing if true.
NullPointerException - for missing resources.
IllegalStateException - if not registered and started.
Future close(Socket socket,
long timeout,
boolean interrupt)
socket - the socket to close.timeout - the timeout in msecs.interrupt - interrupt this thread before closing if true.
NullPointerException - for missing resources.
IllegalStateException - if not registered and started.
Future close(Closeable target,
long timeout,
boolean interrupt)
target - the closeable to close.timeout - the timeout in msecs.interrupt - interrupt this thread before closing if true.
NullPointerException - for missing resources.
IllegalStateException - if not registered and started.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||