Package io.vertx.core.net.endpoint
Interface ServerSelector
-
@Unstable public interface ServerSelector
Select the most appropriate server among the list of servers of an endpoint.- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
select()
Selects a server.default int
select(String key)
Select a server using a routingkey
.
-
-
-
Method Detail
-
select
int select()
Selects a server.- Returns:
- the selected index or
-1
if selection could not be achieved
-
select
default int select(String key)
Select a server using a routingkey
.- Parameters:
key
- a key used for routing in sticky strategies- Returns:
- the selected index or
-1
if selection could not be achieved
-
-