Search in sources :

Example 1 with UploadMetadataGenTransferDecorator

use of org.commonjava.maven.galley.transport.htcli.UploadMetadataGenTransferDecorator in project galley by Commonjava.

the class UploadMetadataGenTransferDecoratorTest method prepare.

@Before
public void prepare() {
    tempFolder = folder.newFolder("cache");
    final UploadMetadataGenTransferDecorator decorator = new UploadMetadataGenTransferDecorator(specialPathManager);
    provider = new TestCacheProvider(tempFolder, events, decorator);
}
Also used : TestCacheProvider(org.commonjava.maven.galley.transport.htcli.testutil.TestCacheProvider) UploadMetadataGenTransferDecorator(org.commonjava.maven.galley.transport.htcli.UploadMetadataGenTransferDecorator) Before(org.junit.Before)

Example 2 with UploadMetadataGenTransferDecorator

use of org.commonjava.maven.galley.transport.htcli.UploadMetadataGenTransferDecorator in project indy by Commonjava.

the class DefaultGalleyStorageProvider method setupTransferDecoratorPipeline.

/**
 * The order is important. We put the checksum decorator at the last because some decorators may change the content.
 */
private void setupTransferDecoratorPipeline() {
    List<TransferDecorator> decorators = new ArrayList<>();
    decorators.add(new IOLatencyDecorator(timerProviderFunction(), meterProvider(), cumulativeTimer()));
    decorators.add(new NoCacheTransferDecorator(specialPathManager));
    decorators.add(new UploadMetadataGenTransferDecorator(specialPathManager, timerProviderFunction()));
    for (TransferDecorator decorator : transferDecorators) {
        decorators.add(decorator);
    }
    decorators.add(getChecksummingTransferDecorator());
    if (featureConfig.getFileChangeTracking()) {
        decorators.add(new FileChangeTrackingDecorator(config));
    }
    transferDecorator = new TransferDecoratorManager(decorators);
}
Also used : NoCacheTransferDecorator(org.commonjava.maven.galley.io.NoCacheTransferDecorator) TransferDecoratorManager(org.commonjava.maven.galley.io.TransferDecoratorManager) ArrayList(java.util.ArrayList) UploadMetadataGenTransferDecorator(org.commonjava.maven.galley.transport.htcli.UploadMetadataGenTransferDecorator) ChecksummingTransferDecorator(org.commonjava.maven.galley.io.ChecksummingTransferDecorator) NoCacheTransferDecorator(org.commonjava.maven.galley.io.NoCacheTransferDecorator) UploadMetadataGenTransferDecorator(org.commonjava.maven.galley.transport.htcli.UploadMetadataGenTransferDecorator) TransferDecorator(org.commonjava.maven.galley.spi.io.TransferDecorator)

Aggregations

UploadMetadataGenTransferDecorator (org.commonjava.maven.galley.transport.htcli.UploadMetadataGenTransferDecorator)2 ArrayList (java.util.ArrayList)1 ChecksummingTransferDecorator (org.commonjava.maven.galley.io.ChecksummingTransferDecorator)1 NoCacheTransferDecorator (org.commonjava.maven.galley.io.NoCacheTransferDecorator)1 TransferDecoratorManager (org.commonjava.maven.galley.io.TransferDecoratorManager)1 TransferDecorator (org.commonjava.maven.galley.spi.io.TransferDecorator)1 TestCacheProvider (org.commonjava.maven.galley.transport.htcli.testutil.TestCacheProvider)1 Before (org.junit.Before)1