All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstreetmap.atlas.utilities.caching.strategies.NoCachingStrategy Maven / Gradle / Ivy

There is a newer version: 7.0.8
Show newest version
package org.openstreetmap.atlas.utilities.caching.strategies;

import java.net.URI;
import java.util.Optional;
import java.util.function.Function;

import org.openstreetmap.atlas.streaming.resource.Resource;

/**
 * Caching strategy that always produces a cache miss.
 *
 * @author lcram
 */
public class NoCachingStrategy extends AbstractCachingStrategy
{
    @Override
    public Optional attemptFetch(final URI resourceURI,
            final Function> defaultFetcher)
    {
        return Optional.empty();
    }

    @Override
    public String getName()
    {
        return "NoCachingStrategy";
    }

    @Override
    public void invalidate()
    {
        return;
    }

    @Override
    public void invalidate(final URI resourceURI)
    {
        return;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy