diff options
3 files changed, 6 insertions, 15 deletions
diff --git a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Docker.java b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Docker.java index 5c2da5c8fad..3752497e13b 100644 --- a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Docker.java +++ b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/Docker.java @@ -3,7 +3,6 @@ package com.yahoo.vespa.hosted.dockerapi; import java.net.InetAddress; import java.util.List; -import java.util.Map; import java.util.Optional; /** @@ -88,8 +87,6 @@ public interface Docker { */ boolean pullImageAsyncIfNeeded(DockerImage image); - void deleteImage(DockerImage dockerImage); - /** * Deletes the local images that are currently not in use by any container and not recently used. */ diff --git a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java index 26ab9cb819c..b1d069d1192 100644 --- a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java +++ b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java @@ -83,7 +83,7 @@ public class DockerImpl implements Docker { } // For testing - DockerImpl(final DockerClient dockerClient) { + DockerImpl(DockerClient dockerClient) { this(null, null); this.dockerClient = dockerClient; } @@ -140,7 +140,7 @@ public class DockerImpl implements Docker { } @Override - public boolean pullImageAsyncIfNeeded(final DockerImage image) { + public boolean pullImageAsyncIfNeeded(DockerImage image) { try { synchronized (monitor) { if (scheduledPulls.contains(image)) return true; @@ -159,7 +159,7 @@ public class DockerImpl implements Docker { } } - private void removeScheduledPoll(final DockerImage image) { + private void removeScheduledPoll(DockerImage image) { synchronized (monitor) { scheduledPulls.remove(image); } @@ -168,7 +168,7 @@ public class DockerImpl implements Docker { /** * Check if a given image is already in the local registry */ - boolean imageIsDownloaded(final DockerImage dockerImage) { + boolean imageIsDownloaded(DockerImage dockerImage) { return inspectImage(dockerImage).isPresent(); } @@ -296,7 +296,7 @@ public class DockerImpl implements Docker { } @Override - public void stopContainer(final ContainerName containerName) { + public void stopContainer(ContainerName containerName) { try { dockerClient.stopContainerCmd(containerName.asString()).withTimeout(secondsToWaitBeforeKilling).exec(); } catch (NotModifiedException ignored) { @@ -381,8 +381,7 @@ public class DockerImpl implements Docker { } } - @Override - public void deleteImage(final DockerImage dockerImage) { + private void deleteImage(final DockerImage dockerImage) { try { dockerClient.removeImageCmd(dockerImage.asString()).exec(); } catch (NotFoundException ignored) { diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java index 64df715aa97..c49e7ad4857 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/integrationTests/DockerMock.java @@ -110,11 +110,6 @@ public class DockerMock implements Docker { } @Override - public void deleteImage(DockerImage dockerImage) { - - } - - @Override public void deleteUnusedDockerImages() { } |