public interface GenericNodeRuntime
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Future<java.lang.Boolean> |
createTimedTask(java.lang.Runnable r,
long delay,
java.util.concurrent.TimeUnit unit,
boolean repeating,
java.lang.Object domain)
Execute a ask after "delay".
|
void |
executeScriptTask(java.lang.Runnable task,
java.lang.Object domain)
Execute a task in the script thread, and set the domain on the thread before doing so.
|
java.util.concurrent.ExecutorService |
getAsyncPool()
Return the thread pool that may be used to run short-lived asynchronous tasks.
|
java.lang.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.
|
java.nio.channels.Selector |
getSelector()
Get the network selector -- internal only.
|
java.util.concurrent.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(java.io.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(java.io.Closeable c)
Remove the object from the list of handles that will be closed.
|
void pin()
void unPin()
java.util.concurrent.ExecutorService getAsyncPool()
java.util.concurrent.ExecutorService getUnboundedPool()
void registerCloseable(java.io.Closeable c)
void unregisterCloseable(java.io.Closeable c)
java.nio.channels.Selector getSelector()
NetworkPolicy getNetworkPolicy()
java.lang.Object getDomain()
void executeScriptTask(java.lang.Runnable task,
java.lang.Object domain)
java.util.concurrent.Future<java.lang.Boolean> createTimedTask(java.lang.Runnable r,
long delay,
java.util.concurrent.TimeUnit unit,
boolean repeating,
java.lang.Object domain)
Copyright © 2018 Apigee Corporation. All Rights Reserved.