public class CapacityAwareTokenWrapperAffinityEvaluatorImpl extends TokenWrapperAffinityEvaluatorImpl implements TokenPoolAware, Closeable
AffinityEvaluator that takes the token usage per agent host into account and thus
gives priority to tokens located on agent hosts with the lowest token usage. AffinityEvaluator makes it also possible to define a maximal capacity per agent host.properties| Constructor and Description |
|---|
CapacityAwareTokenWrapperAffinityEvaluatorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getAffinityScore(Identity i1,
TokenWrapper i2) |
protected String |
getHost(String agentUrl) |
protected void |
init(File configurationFile) |
protected void |
parseConf(File configurationFile) |
void |
setProperties(Map<String,String> properties) |
void |
setTokenPool(TokenPool<?,?> tokenPool) |
public CapacityAwareTokenWrapperAffinityEvaluatorImpl()
public void setTokenPool(TokenPool<?,?> tokenPool)
setTokenPool in interface TokenPoolAwarepublic void setProperties(Map<String,String> properties)
setProperties in interface AffinityEvaluator<Identity,TokenWrapper>setProperties in class SimpleAffinityEvaluator<Identity,TokenWrapper>protected void init(File configurationFile)
protected void parseConf(File configurationFile)
public int getAffinityScore(Identity i1, TokenWrapper i2)
getAffinityScore in interface AffinityEvaluator<Identity,TokenWrapper>getAffinityScore in class TokenWrapperAffinityEvaluatorImplpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2019. All rights reserved.