Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bump to odlparent 3.1.0 and yangtools 2.0.3
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
entityownership
/
selectionstrategy
/
EntityOwnerSelectionStrategy.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java
index 53b35f65c404c81aabce94fcd0b83406c8258ee3..38899ecc318aad351c2fe6c7369d8491fe6b535d 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/selectionstrategy/EntityOwnerSelectionStrategy.java
@@
-9,14
+9,15
@@
package org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy;
import java.util.Collection;
package org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy;
import java.util.Collection;
-import java
.util.Map
;
+import java
x.annotation.Nullable
;
/**
* An EntityOwnerSelectionStrategy is to be used by the EntityOwnershipShard to select a new owner from a collection
/**
* An EntityOwnerSelectionStrategy is to be used by the EntityOwnershipShard to select a new owner from a collection
- * of candidates
+ * of candidates
.
*/
public interface EntityOwnerSelectionStrategy {
/**
*/
public interface EntityOwnerSelectionStrategy {
/**
+ * Returns the time in millis owner selection should be delayed.
*
* @return the time in millis owner selection should be delayed
*/
*
* @return the time in millis owner selection should be delayed
*/
@@
-24,11
+25,11
@@
public interface EntityOwnerSelectionStrategy {
/**
/**
+ * Selects a new owner from the list of viable candidates.
*
*
+ * @param currentOwner the current owner of the entity if any, null otherwise
* @param viableCandidates the available candidates from which to choose the new owner
* @param viableCandidates the available candidates from which to choose the new owner
- * @param statistics contains a snapshot of a mapping between candidate names and the number of entities
- * owned by that candidate
* @return the new owner
*/
* @return the new owner
*/
- String newOwner(
Collection<String> viableCandidates, Map<String, Long> statistic
s);
+ String newOwner(
@Nullable String currentOwner, Collection<String> viableCandidate
s);
}
}