| Constructor and Description |
|---|
TokenPool(AffinityEvaluator affinityEval) |
| Modifier and Type | Method and Description |
|---|---|
int |
getSize() |
List<Token<F>> |
getTokens() |
List<P> |
getWaitingPretenders() |
void |
invalidate(String id) |
void |
invalidateToken(F object) |
void |
keepaliveToken(String id) |
String |
offerToken(F object) |
void |
returnToken(F object) |
F |
selectToken(P pretender,
long timeout) |
F |
selectToken(P pretender,
long matchExistsTimeout,
long noMatchExistsTimeout) |
void |
setKeepaliveTimeout(long timeout) |
public TokenPool(AffinityEvaluator affinityEval)
public void setKeepaliveTimeout(long timeout)
public F selectToken(P pretender, long timeout) throws TimeoutException, InterruptedException
TimeoutExceptionInterruptedExceptionpublic F selectToken(P pretender, long matchExistsTimeout, long noMatchExistsTimeout) throws TimeoutException, InterruptedException
TimeoutExceptionInterruptedExceptionpublic void returnToken(F object)
public void keepaliveToken(String id)
public void invalidate(String id)
public void invalidateToken(F object)
public int getSize()
Copyright © 2018. All rights reserved.