* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy;
+package org.opendaylight.controller.cluster.entityownership.selectionstrategy;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.MoreObjects;
public class LeastLoadedCandidateSelectionStrategy extends AbstractEntityOwnerSelectionStrategy {
private final Map<String, Long> localStatistics = new HashMap<>();
- protected LeastLoadedCandidateSelectionStrategy(long selectionDelayInMillis, Map<String, Long> initialStatistics) {
+ protected LeastLoadedCandidateSelectionStrategy(final long selectionDelayInMillis,
+ final Map<String, Long> initialStatistics) {
super(selectionDelayInMillis, initialStatistics);
localStatistics.putAll(initialStatistics);
}
@Override
- public String newOwner(String currentOwner, Collection<String> viableCandidates) {
+ public String newOwner(final String currentOwner, final Collection<String> viableCandidates) {
Preconditions.checkArgument(viableCandidates.size() > 0);
String leastLoadedCandidate = null;
long leastLoadedCount = Long.MAX_VALUE;