Package com.yahoo.vespa.config
Interface ConnectionPool
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
JRTConnectionPool
,MockConnection
public interface ConnectionPool extends AutoCloseable
- Author:
- hmusum
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Connection
getCurrent()
int
getSize()
Connection
switchConnection(Connection failingConnection)
Switches to another (healthy, if possible) Connection instance.
-
-
-
Method Detail
-
close
void close()
- Specified by:
close
in interfaceAutoCloseable
-
getCurrent
Connection getCurrent()
-
switchConnection
Connection switchConnection(Connection failingConnection)
Switches to another (healthy, if possible) Connection instance.getCurrent()
will return this instance afterwards, which is also the return value.- Returns:
- a Connection
-
getSize
int getSize()
-
-