diff options
author | John Arthorne | 2009-04-15 02:48:49 +0000 |
---|---|---|
committer | John Arthorne | 2009-04-15 02:48:49 +0000 |
commit | 9ce0dc7c3606ddcc8a3eedbb78b1536a6e63e137 (patch) | |
tree | c637a88c066117fb1bd439f4c79dc4e0fb106ac5 /bundles/org.eclipse.equinox.p2.artifact.repository | |
parent | 6fe5b52528f3d28fe1cba903314b3e94e0f643d6 (diff) | |
download | rt.equinox.p2-9ce0dc7c3606ddcc8a3eedbb78b1536a6e63e137.tar.gz rt.equinox.p2-9ce0dc7c3606ddcc8a3eedbb78b1536a6e63e137.tar.xz rt.equinox.p2-9ce0dc7c3606ddcc8a3eedbb78b1536a6e63e137.zip |
Bug 272243 Mirror sorting based on transfer rate broken
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
2 files changed, 1 insertions, 54 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/DownloadStatus.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/DownloadStatus.java deleted file mode 100644 index 5ef7d23ca..000000000 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/DownloadStatus.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.equinox.internal.p2.artifact.repository; - -import org.eclipse.core.runtime.Status; - -/** - * A status object that optionally reports additional information about the - * result of a download. - */ -public class DownloadStatus extends Status { - public static final long UNKNOWN_RATE = -1; - - private long speed = UNKNOWN_RATE; - - /** - * Constructs a new DownloadStatus with the given attributes. - */ - public DownloadStatus(int severity, String pluginId, String message) { - super(severity, pluginId, message); - } - - /** - * Constructs a new DownloadStatus with the given attributes. - */ - public DownloadStatus(int severity, String pluginId, String message, Throwable exception) { - super(severity, pluginId, message, exception); - } - - /** - * Returns the download rate in bytes per second. If the rate is unknown, - * @{link {@link #UNKNOWN_RATE}} is returned. - * @return the download rate in bytes per second - */ - public long getTransferRate() { - return speed; - } - - /** - * Sets the download rate of the transfer in bytes per second. - * @param rate The download rate in bytes per second - */ - public void setTransferRate(long rate) { - this.speed = rate; - } -} diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java index 21b35d24a..c57e9c78c 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java @@ -18,6 +18,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import org.eclipse.core.runtime.*; import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; import org.eclipse.equinox.internal.p2.core.helpers.Tracing; +import org.eclipse.equinox.internal.p2.repository.DownloadStatus; import org.eclipse.equinox.internal.provisional.p2.repository.IRepository; import org.w3c.dom.*; |