Interface ConnectionPool
-
- All Implemented Interfaces:
public interface ConnectionPoolConnection Pool that maintains connections to the E3DC home power plant.
Each implementation ensures that you always get an already authenticated connection.
- Since:
2.0
-
-
Method Summary
Modifier and Type Method Description abstract HomePowerPlantConnectiongetConnection()Provides an already authenticated connection to the E3DC home power plant. abstract UnitreleaseConnection(HomePowerPlantConnection toRelease)Releases the connection toRelease to the E3DC home power plant. abstract <R extends Any> RexecuteAndRelease(Function1<HomePowerPlantConnection, R> receiver)Executes the passed function and returns a connection to the E3DC home power plant for use with pure abstract Unitshutdown()Closes all connections in the pool -
-
Method Detail
-
getConnection
abstract HomePowerPlantConnection getConnection()
Provides an already authenticated connection to the E3DC home power plant.
- Returns:
Authenticated connection to the home power plant
- Since:
2.0
-
releaseConnection
abstract Unit releaseConnection(HomePowerPlantConnection toRelease)
Releases the connection toRelease to the E3DC home power plant.
It is up to the implementation whether the connection is closed directly or pooled for later use.
- Parameters:
toRelease- Connection to be released- Since:
2.0
-
executeAndRelease
abstract <R extends Any> R executeAndRelease(Function1<HomePowerPlantConnection, R> receiver)
Executes the passed function and returns a connection to the E3DC home power plant for use with pure
- Parameters:
receiver- Function to be executed- Returns:
Return value of the passed function
- Since:
2.0
-
-
-
-