org.rhq.enterprise.server.core.concurrency
Class LatchedServiceController

java.lang.Object
  extended by org.rhq.enterprise.server.core.concurrency.LatchedServiceController

public class LatchedServiceController
extends Object

Author:
Joseph Marques, John Mazzitelli

Nested Class Summary
static class LatchedServiceController.LatchedService
           
 
Constructor Summary
LatchedServiceController(Collection<? extends LatchedServiceController.LatchedService> services)
          Creates the controller that will be responsible for launching the services in a thread pool.
 
Method Summary
 void executeServices()
           
 int getThreadPoolSize()
           
 void setThreadPoolSize(int threadPoolSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LatchedServiceController

public LatchedServiceController(Collection<? extends LatchedServiceController.LatchedService> services)
Creates the controller that will be responsible for launching the services in a thread pool. Note that you must ensure the order of the given services is in the order you want them submitted to the thread pool. N services will be executed concurrently (where N is the size of the thread pool) but if there are dependencies among services, you must ensure services appear after their dependencies in the list.

Parameters:
services - list of services that will be invoked
Method Detail

getThreadPoolSize

public int getThreadPoolSize()

setThreadPoolSize

public void setThreadPoolSize(int threadPoolSize)

executeServices

public void executeServices()
                     throws LatchedServiceCircularityException
Throws:
LatchedServiceCircularityException


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.