aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java55
1 files changed, 1 insertions, 54 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
index 949263b61..37563cd83 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java
@@ -278,59 +278,6 @@ public class DownloadRemoteIndexTask
}
}
- /*
- private static final class DownloadListener
- implements TransferListener
- {
- private Logger log = LoggerFactory.getLogger( getClass() );
-
- private String resourceName;
-
- private long startTime;
-
- private int totalLength = 0;
-
- public void transferInitiated( TransferEvent transferEvent )
- {
- startTime = System.currentTimeMillis();
- resourceName = transferEvent.getResource().getName();
- log.debug( "initiate transfer of {}", resourceName );
- }
-
- public void transferStarted( TransferEvent transferEvent )
- {
- this.totalLength = 0;
- resourceName = transferEvent.getResource().getName();
- log.info( "start transfer of {}", transferEvent.getResource().getName() );
- }
-
- public void transferProgress( TransferEvent transferEvent, byte[] buffer, int length )
- {
- log.debug( "transfer of {} : {}/{}", transferEvent.getResource().getName(), buffer.length, length );
- this.totalLength += length;
- }
-
- public void transferCompleted( TransferEvent transferEvent )
- {
- resourceName = transferEvent.getResource().getName();
- long endTime = System.currentTimeMillis();
- log.info( "end of transfer file {} {} kb: {}s", transferEvent.getResource().getName(),
- this.totalLength / 1024, ( endTime - startTime ) / 1000 );
- }
-
- public void transferError( TransferEvent transferEvent )
- {
- log.info( "error of transfer file {}: {}", transferEvent.getResource().getName(),
- transferEvent.getException().getMessage(), transferEvent.getException() );
- }
-
- public void debug( String message )
- {
- log.debug( "transfer debug {}", message );
- }
- }
- */
-
private static class ZeroCopyConsumerListener
extends ZeroCopyConsumer
{
@@ -388,7 +335,7 @@ public class DownloadRemoteIndexTask
this.startTime = System.currentTimeMillis();
super.onResponseReceived( response );
this.totalLength = response.getEntity().getContentLength();
- log.info( "start transfer of {}, contentLength: {}", resourceName, this.totalLength );
+ log.info( "start transfer of {}, contentLength: {}", resourceName, this.totalLength / 1024 );
}
@Override