public interface ManagablePool extends Pool
The key is a randomly generated number greater than one assigned by the PoolManager and given to the Pool and the PoolController. The mechanism to generate the number is up to the PoolManager's policy. Keep in mind that should the key be made publicly available, the Pool is susceptible to a replay attack. Therefore, it is suggested that the key be created at the same time the Pool is created.
| Modifier and Type | Method and Description |
|---|---|
void |
grow(int amount,
long key)
Grow by the specified amount.
|
void |
shrink(int amount,
long key)
Shrink the pool by the specified amount.
|
int |
size(long key)
Determine the pool's current size.
|
acquire, newInstance, releasevoid grow(int amount,
long key)
throws java.lang.IllegalAccessException
amount - an integer amount to increase the pool size by.key - an integer number supplied by the PoolManager to
validate that the method is called legitimatelyjava.lang.IllegalAccessException - if the key does not match the
controller's key.void shrink(int amount,
long key)
throws java.lang.IllegalAccessException
amount - an integer amount to decrease the pool size by.key - an integer number supplied by the PoolManager to
validate that the method is called legitimatelyjava.lang.IllegalAccessException - if the key does not match the
controller's key.int size(long key)
throws java.lang.IllegalAccessException
key - an integer number supplied by the PoolManager to
validate that the method is called legitimatelyjava.lang.IllegalAccessException - if the key does not match the
controller's key.