public interface GenericNodeRuntime
| Modifier and Type | Method and Description |
|---|---|
Future<Boolean> |
createTimedTask(Runnable r,
long delay,
TimeUnit unit,
boolean repeating,
Object domain)
Execute a ask after "delay".
|
void |
executeScriptTask(Runnable task,
Object domain)
Execute a task in the script thread, and set the domain on the thread before doing so.
|
ExecutorService |
getAsyncPool()
Return the thread pool that may be used to run short-lived asynchronous tasks.
|
Object |
getDomain()
Return the current Node.js domain of the calling scrpit.
|
NetworkPolicy |
getNetworkPolicy()
Return an object that must be called every time the process tries to open an outgoing network
connection or listen for incoming connections.
|
Selector |
getSelector()
Get the network selector -- internal only.
|
ExecutorService |
getUnboundedPool()
Return the thread pool that may be used to run tasks that should start immediately in a new thread
regardless of the thread pool size.
|
void |
pin()
Increment the "pin count" on this script.
|
void |
registerCloseable(Closeable c)
Put an object on a list of handles that will be automatically closed when the script exits.
|
void |
unPin()
Decrement the "pin count," which may cause the script to exit at the end of the current function.
|
void |
unregisterCloseable(Closeable c)
Remove the object from the list of handles that will be closed.
|
void pin()
void unPin()
ExecutorService getAsyncPool()
ExecutorService getUnboundedPool()
void registerCloseable(Closeable c)
void unregisterCloseable(Closeable c)
Selector getSelector()
NetworkPolicy getNetworkPolicy()
Object getDomain()
void executeScriptTask(Runnable task, Object domain)
Copyright © 2016 Apigee Corporation. All Rights Reserved.