com.bigdata.service
Class LoadBalancerService.ServiceLoadHelperWithScores

java.lang.Object
  extended by com.bigdata.service.AbstractServiceLoadHelper
      extended by com.bigdata.service.AbstractServiceLoadHelperWithScores
          extended by com.bigdata.service.LoadBalancerService.ServiceLoadHelperWithScores
All Implemented Interfaces:
IServiceLoadHelper
Enclosing class:
LoadBalancerService

protected class LoadBalancerService.ServiceLoadHelperWithScores
extends AbstractServiceLoadHelperWithScores

Integration with the LoadBalancerService.

Version:
$Id: LoadBalancerService.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from class com.bigdata.service.AbstractServiceLoadHelperWithScores
INFO, knownGood, log, scores
 
Fields inherited from class com.bigdata.service.AbstractServiceLoadHelper
joinTimeout
 
Constructor Summary
LoadBalancerService.ServiceLoadHelperWithScores(UUID knownGood, ServiceScore[] scores)
           
 
Method Summary
protected  void awaitJoin(long timeout, TimeUnit unit)
          Await the join of an IDataService.
protected  UUID[] getActiveServices()
          Return an array of service UUIDs for all of the active IDataServices that we know about right now (snapshot).
protected  boolean isActiveDataService(UUID serviceUUID)
          Return true iff the given serviceUUID identifies an active IDataService.
protected  boolean isUnderUtilizedDataService(ServiceScore score, ServiceScore[] scores)
          Return true iff the service is under-utilized.
 
Methods inherited from class com.bigdata.service.AbstractServiceLoadHelperWithScores
getUnderUtilizedDataServices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadBalancerService.ServiceLoadHelperWithScores

public LoadBalancerService.ServiceLoadHelperWithScores(UUID knownGood,
                                                       ServiceScore[] scores)
Method Detail

awaitJoin

protected void awaitJoin(long timeout,
                         TimeUnit unit)
                  throws InterruptedException
Description copied from class: AbstractServiceLoadHelper
Await the join of an IDataService.

Specified by:
awaitJoin in class AbstractServiceLoadHelper
Parameters:
timeout - The timeout.
unit - The unit for the timeout.
Throws:
InterruptedException

getActiveServices

protected UUID[] getActiveServices()
Description copied from class: AbstractServiceLoadHelper
Return an array of service UUIDs for all of the active IDataServices that we know about right now (snapshot).

Specified by:
getActiveServices in class AbstractServiceLoadHelper
Returns:
The array and never null.

isActiveDataService

protected boolean isActiveDataService(UUID serviceUUID)
Description copied from class: AbstractServiceLoadHelper
Return true iff the given serviceUUID identifies an active IDataService.

Specified by:
isActiveDataService in class AbstractServiceLoadHelper
Parameters:
serviceUUID - The service UUID.

isUnderUtilizedDataService

protected boolean isUnderUtilizedDataService(ServiceScore score,
                                             ServiceScore[] scores)
Description copied from class: AbstractServiceLoadHelper
Return true iff the service is under-utilized.

Specified by:
isUnderUtilizedDataService in class AbstractServiceLoadHelper
Parameters:
score - The score for the service.
scores - The set of scores for the known services.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.