Class BasicRepositoryConnector

    • Field Detail

      • CONFIG_PROP_THREADS

        private static final java.lang.String CONFIG_PROP_THREADS
        See Also:
        Constant Field Values
      • CONFIG_PROP_RESUME

        private static final java.lang.String CONFIG_PROP_RESUME
        See Also:
        Constant Field Values
      • CONFIG_PROP_RESUME_THRESHOLD

        private static final java.lang.String CONFIG_PROP_RESUME_THRESHOLD
        See Also:
        Constant Field Values
      • CONFIG_PROP_SMART_CHECKSUMS

        private static final java.lang.String CONFIG_PROP_SMART_CHECKSUMS
        See Also:
        Constant Field Values
      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • maxThreads

        private final int maxThreads
      • smartChecksums

        private final boolean smartChecksums
      • persistedChecksums

        private final boolean persistedChecksums
      • executor

        private java.util.concurrent.Executor executor
      • closed

        private boolean closed
    • Method Detail

      • getExecutor

        private java.util.concurrent.Executor getExecutor​(java.util.Collection<?> artifacts,
                                                          java.util.Collection<?> metadatas)
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • close

        public void close()
        Description copied from interface: RepositoryConnector
        Closes this connector and frees any network resources associated with it. Once closed, a connector must not be used for further transfers, any attempt to do so would yield a IllegalStateException or similar. Closing an already closed connector is harmless and has no effect.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface RepositoryConnector
      • get

        public void get​(java.util.Collection<? extends ArtifactDownload> artifactDownloads,
                        java.util.Collection<? extends MetadataDownload> metadataDownloads)
        Description copied from interface: RepositoryConnector
        Performs the specified downloads. If a download fails, the connector stores the underlying exception in the download object such that callers can inspect the result via ArtifactTransfer.getException() and MetadataTransfer.getException(), respectively. If reasonable, a connector should continue to process the remaining downloads after an error to retrieve as many items as possible. The connector may perform the transfers concurrently and in any order.
        Specified by:
        get in interface RepositoryConnector
        Parameters:
        artifactDownloads - The artifact downloads to perform, may be null or empty.
        metadataDownloads - The metadata downloads to perform, may be null or empty.
      • put

        public void put​(java.util.Collection<? extends ArtifactUpload> artifactUploads,
                        java.util.Collection<? extends MetadataUpload> metadataUploads)
        Description copied from interface: RepositoryConnector
        Performs the specified uploads. If an upload fails, the connector stores the underlying exception in the upload object such that callers can inspect the result via ArtifactTransfer.getException() and MetadataTransfer.getException(), respectively. The connector may perform the transfers concurrently and in any order.
        Specified by:
        put in interface RepositoryConnector
        Parameters:
        artifactUploads - The artifact uploads to perform, may be null or empty.
        metadataUploads - The metadata uploads to perform, may be null or empty.
      • safe

        private static <T> java.util.Collection<T> safe​(java.util.Collection<T> items)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object