This is an asynchronous termination request. To wait for the job to actually terminate follow this with a call to {@link #join}.
After this method has been invoked, no new lookup services will be discovered, and the effect of any new operations performed on the current instance of this class are undefined. @see net.jini.discovery.DiscoveryManagement#terminate
After this method has been invoked, no new lookup services will be discovered, and the effect of any new operations performed on the current instance of this class are undefined. @see net.jini.discovery.DiscoveryManagement#terminate
JoinManager
. This method will cancel all of the service's managed leases that were granted by the lookup services with which the service is registered, and will terminate all threads that have been created. Note that if the discovery manager employed by the instance of this class that is being terminated was created by the instance itself, this method will terminate all discovery processing being performed by that manager object on behalf of the service; otherwise, the discovery manager supplied by the service is still valid.
Whether an instance of the LeaseRenewalManager
class was supplied by the service or created by the JoinManager
itself, any reference to that object obtained by the service prior to termination will still be valid after termination. Note also this class makes certain concurrency guarantees with respect to an invocation of the terminate method while other method invocations are in progress. The termination process will not begin until completion of all invocations of the methods defined in the public interface of this class. Furthermore, once the termination process has begun, no further remote method invocations will be made by this class, and all other method invocations made on this class will not return until the termination process has completed.
Upon completion of the termination process, the semantics of all current and future method invocations on the instance of this class that was just terminated are undefined; although the reference to the LeaseRenewalManager
object employed by that instance of JoinManager
is still valid.
LookupCache
. For that instance, this method cancels all event leases granted by the lookup services that supplied the contents of the cache, and un-exports all remote listener objects registered with those lookup services. The terminate
method is typically called when the entity is no longer interested in the contents of the LookupCache
.
terminate
method performs cleanup duties related to the termination of the event mechanism for lookup service discovery, the event mechanism for service discovery, and the cache management duties of the ServiceDiscoveryManager
. For each instance of LookupCache
created and managed by the ServiceDiscoveryManager
, the terminate
method will do the following:
DiscoveryEvent
objects or, if the discovery manager employed by the ServiceDiscoveryManager
was created by the ServiceDiscoveryManager
itself, terminate all discovery processing being performed by that manager object on behalf of the entity.
IllegalStateException
.
@see net.jini.lookup.LookupCache
@see net.jini.discovery.DiscoveryEvent
MessageRouter
thread. This method should be called after all the processing is finished.
Transition to {@link CaseExecutionState#TERMINATING_ON_TERMINATION} state.
If this
case execution is associated with a {@link Stage} or{@link Task}, then this
case execution must be in {@link CaseExecutionState#ACTIVE}state to be able to do this transition.
And if this
case execution is association with {@link EventListener EventListener}or a {@link Milestone}, then this
case execution must be in {@link CaseExecutionState#AVAILABLE} state to be able to do this transition.
For a {@link Stage} instance the termination of this
case executionwill be propagated down to all its contained {@link EventListener EventListener}, {@link Milestone}, {@link Stage}, and {@link Task} instances.
In case of a {@link Stage} this corresponding case execution stays in this state untilall children notified this case execution, that they terminated successfully. Afterwards the method {@link #performTerminate()} must be called to complete the transition into the state{@link CaseExecutionState#TERMINATED}.
@throws CaseIllegalStateTransitionException will be thrown, ifthis
case executionis not in the expected state.
@throws ProcessEngineException when an internal exception happens during the executionof the command.
Invoke {@link ReadHandler#onError(Throwable)} (assuming a {@link ReadHandler}is available) } passing a {#link CancellationException} if the current {@link Connection} is open, or a {#link EOFException} ifthe connection was unexpectedly closed.
@since 2.0.1WorkerPool
might call this method to hint the active WorkTask
instance to complete execution as soon as possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|