com.bigdata.service
Class AbstractServiceLoadHelper
java.lang.Object
com.bigdata.service.AbstractServiceLoadHelper
- All Implemented Interfaces:
- IServiceLoadHelper
- Direct Known Subclasses:
- AbstractServiceLoadHelperWithoutScores, AbstractServiceLoadHelperWithScores
public abstract class AbstractServiceLoadHelper
- extends Object
- implements IServiceLoadHelper
Base class for abstract implementations with integration points for the
LoadBalancerService.
- Version:
- $Id: AbstractServiceLoadHelper.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
joinTimeout
protected final long joinTimeout
AbstractServiceLoadHelper
protected AbstractServiceLoadHelper(long joinTimeout)
- Parameters:
joinTimeout -
isUnderUtilizedDataService
protected abstract boolean isUnderUtilizedDataService(ServiceScore score,
ServiceScore[] scores)
- Return
true iff the service is under-utilized.
- Parameters:
score - The score for the service.scores - The set of scores for the known services.
isActiveDataService
protected abstract boolean isActiveDataService(UUID serviceUUID)
- Return
true iff the given serviceUUID identifies an
active IDataService.
- Parameters:
serviceUUID - The service UUID.
awaitJoin
protected abstract void awaitJoin(long timeout,
TimeUnit unit)
throws InterruptedException
- Await the join of an
IDataService.
- Parameters:
timeout - The timeout.unit - The unit for the timeout.
- Throws:
InterruptedException
getActiveServices
protected abstract UUID[] getActiveServices()
- Return an array of service UUIDs for all of the active
IDataServices that we know about right now (snapshot).
- Returns:
- The array and never
null.
Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.