|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.PSDKRuntime
public final class PSDKRuntime
PSDK Runtime helpers.
Method Summary | |
---|---|
static void |
awaitTermination()
Waits for termination of PSDK activity. |
static void |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Waits for termination of PSDK activity or timeout occurs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void awaitTermination() throws java.lang.InterruptedException
awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS)
.
To initiate PSDK activity termination:
InvokerFactory.namedInvoker(String)
or InvokerFactory.namedInvoker(String, int)
then these invokers have to be released (as many times as it were requested) using
InvokerFactory.releaseInvoker(String)
;SingleThreadInvoker
were instantiated
then these invokers have to be released using
SingleThreadInvoker.release()
;Scheduler.schedule(long, long, TimerAction)
then these timer actions have to be canceled using
TimerActionTicket.cancel()
;This method blocks until:
NOTE: this method must be called outside of any PSDK invoker or any PSDK timer action because the method waits for termination of all PSDK invokers and PSDK timer actions.
java.lang.InterruptedException
- when the caller thread was interrupted.public static void awaitTermination(long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
To initiate PSDK activity termination:
InvokerFactory.namedInvoker(String)
or InvokerFactory.namedInvoker(String, int)
then these invokers have to be released (as many times as it were requested) using
InvokerFactory.releaseInvoker(String)
;SingleThreadInvoker
were instantiated
then these invokers have to be released using
SingleThreadInvoker.release()
;Scheduler.schedule(long, long, TimerAction)
then these timer actions have to be canceled using
TimerActionTicket.cancel()
;This method blocks until:
NOTE: this method must be called outside of any PSDK invoker or any PSDK timer action because the method waits for termination of all PSDK invokers and PSDK timer actions.
timeout
- the maximum time to waittimeUnit
- the time unit of the timeout
argument
java.lang.InterruptedException
- when the caller thread was interrupted.
java.util.concurrent.TimeoutException
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |