@Validated
public interface ClusterLoadBalancer
extends org.springframework.core.Ordered
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ORDER
The default order to apply to any implementation that doesn't explicitly set one.
|
Modifier and Type | Method and Description |
---|---|
default int |
getOrder() |
Cluster |
selectCluster(java.util.List<Cluster> clusters,
JobRequest jobRequest)
Return best cluster to run job on.
|
static final int DEFAULT_ORDER
Ordered
,
OrderComparator
,
Constant Field Values@Nullable Cluster selectCluster(@Nonnull @NonNull @NotEmpty java.util.List<Cluster> clusters, @Nonnull @NonNull JobRequest jobRequest) throws GenieException
clusters
- An immutable, non-empty list of available clusters to choose fromjobRequest
- The job request these clusters are being load balanced forGenieException
- if there is any errordefault int getOrder()
getOrder
in interface org.springframework.core.Ordered