org.apache.aries.quiesce.manager.impl
Class QuiesceManagerImpl

java.lang.Object
  extended by org.apache.aries.quiesce.manager.impl.QuiesceManagerImpl
All Implemented Interfaces:
QuiesceManager

public class QuiesceManagerImpl
extends Object
implements QuiesceManager


Constructor Summary
QuiesceManagerImpl(org.osgi.framework.BundleContext bc)
           
 
Method Summary
 void quiesce(List<org.osgi.framework.Bundle> bundlesToQuiesce)
          Attempts to quiesce all bundles in the list, using the default timeout.
 void quiesce(long timeout, List<org.osgi.framework.Bundle> bundles)
          Attempts to quiesce all bundles in the list.
 Future<?> quiesceWithFuture(List<org.osgi.framework.Bundle> bundlesToQuiesce)
          Request a collection of bundles to be quiesced like quiesce(long, List<Bundle>) return a Future that the caller can block on instead of void
 Future<?> quiesceWithFuture(long timeout, List<org.osgi.framework.Bundle> bundles)
          Request a collection of bundles to be quiesced like quiesce(long, List<Bundle>) return a Future that the caller can block on instead of void
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuiesceManagerImpl

public QuiesceManagerImpl(org.osgi.framework.BundleContext bc)
Method Detail

quiesce

public void quiesce(long timeout,
                    List<org.osgi.framework.Bundle> bundles)
Attempts to quiesce all bundles in the list. After the timeout has elapsed, or if successfully quiesced before that, the bundles are stopped. This method is non-blocking. Calling objects wishing to track the state of the bundles need to listen for the resulting stop events.

Specified by:
quiesce in interface QuiesceManager
Parameters:
timeout - time to wait (in milliseconds) for all the quiesce participants to finish before stopping the bundles. If some quiesce participants do not finish within the given timeout the bundles are stopped regardless at the timeout

quiesceWithFuture

public Future<?> quiesceWithFuture(List<org.osgi.framework.Bundle> bundlesToQuiesce)
Description copied from interface: QuiesceManager
Request a collection of bundles to be quiesced like quiesce(long, List<Bundle>) return a Future that the caller can block on instead of void

Specified by:
quiesceWithFuture in interface QuiesceManager
Returns:
a Future that captures the execution of quiesce. The returned Future does not support the cancel operation.

quiesceWithFuture

public Future<?> quiesceWithFuture(long timeout,
                                   List<org.osgi.framework.Bundle> bundles)
Description copied from interface: QuiesceManager
Request a collection of bundles to be quiesced like quiesce(long, List<Bundle>) return a Future that the caller can block on instead of void

Specified by:
quiesceWithFuture in interface QuiesceManager
Parameters:
timeout - time to wait (in milliseconds) for all the quiesce participants to finish before stopping the bundles. If some quiesce participants do not finish within the given timeout the bundles are stopped regardless at the timeout
Returns:
a Future that captures the execution of quiesce. The returned Future does not support the cancel operation.

quiesce

public void quiesce(List<org.osgi.framework.Bundle> bundlesToQuiesce)
Attempts to quiesce all bundles in the list, using the default timeout. After the timeout has elapsed, or if successfully quiesced before that, the bundles are stopped. This method is non-blocking. Calling objects wishing to track the state of the bundles need to listen for the resulting stop events.

Specified by:
quiesce in interface QuiesceManager


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.