Interface ILoadBalancer
-
- All Implemented Interfaces:
public interface ILoadBalancer
-
-
Method Summary
Modifier and Type Method Description LavalinkNode
selectNode()
Selects a node based on the criteria of the load balancer. abstract LavalinkNode
selectNode(VoiceRegion region, Long guildId)
Selects a node based on the criteria of the load balancer. abstract Unit
addPenaltyProvider(IPenaltyProvider penaltyProvider)
Adds a penalty provider to the load balancer. abstract Unit
removePenaltyProvider(IPenaltyProvider penaltyProvider)
Removes a penalty provider from the load balancer. -
-
Method Detail
-
selectNode
LavalinkNode selectNode()
Selects a node based on the criteria of the load balancer.
- Returns:
The best node that matches the criteria
-
selectNode
abstract LavalinkNode selectNode(VoiceRegion region, Long guildId)
Selects a node based on the criteria of the load balancer.
- Parameters:
region
- A voice region may be provided to filter on the closest region to this nodeguildId
- The ID of the guild to be associated with the returned node- Returns:
The best node that matches the criteria
-
addPenaltyProvider
abstract Unit addPenaltyProvider(IPenaltyProvider penaltyProvider)
Adds a penalty provider to the load balancer.
-
removePenaltyProvider
abstract Unit removePenaltyProvider(IPenaltyProvider penaltyProvider)
Removes a penalty provider from the load balancer.
-
-
-
-