summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2019-10-14 13:14:27 +0200
committerMartin Polden <mpolden@mpolden.no>2019-10-14 13:14:27 +0200
commitcccd3ff48a85394bc5be508863b5d35282aabfc4 (patch)
tree6fcba63c326f9891292fc24bb0d1c65a5170f690
parentb31de6acc6b24a6f4c6596385ee20df552701ce3 (diff)
Remove unused method
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/rotation/RotationRepository.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/rotation/RotationRepository.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/rotation/RotationRepository.java
index 9f6bbcd2a5a..766d2b5e461 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/rotation/RotationRepository.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/rotation/RotationRepository.java
@@ -6,11 +6,9 @@ import com.yahoo.config.application.api.Endpoint;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.Environment;
-import com.yahoo.config.provision.InstanceName;
import com.yahoo.config.provision.RegionName;
-import com.yahoo.vespa.hosted.controller.Application;
-import com.yahoo.vespa.hosted.controller.Instance;
import com.yahoo.vespa.hosted.controller.ApplicationController;
+import com.yahoo.vespa.hosted.controller.Instance;
import com.yahoo.vespa.hosted.controller.application.AssignedRotation;
import com.yahoo.vespa.hosted.controller.application.EndpointId;
import com.yahoo.vespa.hosted.controller.persistence.CuratorDb;
@@ -58,15 +56,7 @@ public class RotationRepository {
return new RotationLock(curator.lockRotations());
}
- /** Get rotation for given application */
- public Optional<Rotation> getRotation(Instance instance) {
- return instance.rotations().stream()
- .map(AssignedRotation::rotationId)
- .map(allRotations::get)
- .findFirst();
- }
-
- /** Get rotation for the given rotationId */
+ /** Get rotation by given rotationId */
public Optional<Rotation> getRotation(RotationId rotationId) {
return Optional.of(allRotations.get(rotationId));
}