public abstract class ObjectPool<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<T,Long> |
locked |
protected Map<T,Long> |
unlocked |
| Constructor and Description |
|---|
ObjectPool(int expirationInSeconds) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIn(T t) |
T |
checkOut() |
protected abstract T |
create() |
abstract void |
expire(T o) |
abstract boolean |
validate(T o) |
protected abstract T create() throws IOException
IOExceptionpublic abstract boolean validate(T o)
public abstract void expire(T o)
public T checkOut() throws IOException
IOExceptionpublic void checkIn(T t)
Copyright © 2018. All rights reserved.