Class ArtifactTransferPolicy


  • public abstract class ArtifactTransferPolicy
    extends Object
    Policy for picking the internally used artifact format when obtaining an artifact. Different policies may optimize for network bandwidth or CPU usage.
    See Also:
    IArtifactProvider#getArtifact(IArtifactKey, OutputStream, IProgressMonitor)
    • Constructor Detail

      • ArtifactTransferPolicy

        public ArtifactTransferPolicy()
    • Method Detail

      • sortFormatsByPreference

        public abstract List<org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor> sortFormatsByPreference​(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor[] artifactDescriptors)
        Sorts a list of artifact formats by the order in which they should be tried to be used for a (non-raw) artifact read operation.
        Parameters:
        formats - the list of raw artifact formats available from a provider
        Returns:
        the list of formats, sorted by preference
      • isCanonicalFormat

        public static boolean isCanonicalFormat​(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor format)
      • isPack200Format

        public static boolean isPack200Format​(org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor format)