public static interface Operator.RuntimeEnvironment
This is only valid during application runtime. It will not be valid during typecheck.
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.ExecutorService |
createExecutor(int maxNumberOfWorkerThreads)
Create an ExecutorService.
|
Constants.LeadershipStatus |
getLeadershipStatus()
return the LeadershipStatus of this server
|
Operator.SharedObjectManager |
getSharedObjectManager()
Return the SharedObjectManager
|
StreamBaseURI |
getURI()
Return the URI of this Server.
|
void |
registerUnmanagedThread(java.lang.String name)
Threads that do not derive from Operator may call this method
and their CPU usage will be tracked by the StreamBase profiler.
|
void |
unregisterUnmanagedThread()
Threads which have called registerUnmanagedThread() and that are no longer interested in
having the StreamBase profiler track them should call this method.
|
StreamBaseURI getURI()
Constants.LeadershipStatus getLeadershipStatus()
Operator.SharedObjectManager getSharedObjectManager()
Operator.SharedObjectManager
java.util.concurrent.ExecutorService createExecutor(int maxNumberOfWorkerThreads)
maxNumberOfWorkerThreads
- the maximum number of worker threads, use 0 or -1
for unlimited number of worker threads, otherwise the number of worker threads is
capped to the maxNumberOfWorkerThreads given.ExecutorService
void registerUnmanagedThread(java.lang.String name)
public void run() { registerUnmanagedThread("QuotesProcessingThread") try { while (keepGoing) { // work. } } catch (Throwable t) { // handle problem. } finally { // make certain to unregister unregisterUnmanagedThread(); } }
name
- - This name will be appended to the operator path name and be used
as the thread name.void unregisterUnmanagedThread()