Package io.agroal.api.cache
Interface ConnectionCache
-
public interface ConnectionCache
Interface for a cache of connections. It's intended for mapping connections to executing threads.- Author:
- Luis Barreiro
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Acquirable
get()
Get a acquirable object from cache.static ConnectionCache
none()
An implementation that does not cache.void
put(Acquirable acquirable)
Cache an acquirable object on this cache.void
reset()
Reset the cache.
-
-
-
Method Detail
-
none
static ConnectionCache none()
An implementation that does not cache.
-
get
Acquirable get()
Get a acquirable object from cache.- Returns:
- a connection successfully acquired, according to
Acquirable.acquire()
-
put
void put(Acquirable acquirable)
Cache an acquirable object on this cache.
-
reset
void reset()
Reset the cache.
-
-