internal.sdmxdl.NoOpCaching Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdmx-dl-api Show documentation
Show all versions of sdmx-dl-api Show documentation
Easily download official statistics - API
The newest version!
package internal.sdmxdl;
import lombok.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import sdmxdl.DataRepository;
import sdmxdl.ErrorListener;
import sdmxdl.EventListener;
import sdmxdl.ext.Cache;
import sdmxdl.ext.Persistence;
import sdmxdl.file.FileSource;
import sdmxdl.file.spi.FileCaching;
import sdmxdl.web.MonitorReports;
import sdmxdl.web.WebSource;
import sdmxdl.web.spi.WebCaching;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
public enum NoOpCaching implements FileCaching, WebCaching {
INSTANCE;
@Override
public @NonNull String getFileCachingId() {
return "NO_OP";
}
@Override
public @NonNull String getWebCachingId() {
return "NO_OP";
}
@Override
public int getFileCachingRank() {
return UNKNOWN_FILE_CACHING_RANK;
}
@Override
public int getWebCachingRank() {
return UNKNOWN_WEB_CACHING_RANK;
}
@Override
public @NonNull Cache getReaderCache(
@NonNull FileSource source,
@NonNull List persistences,
@Nullable EventListener super FileSource> onEvent,
@Nullable ErrorListener super FileSource> onError) {
return Cache.noOp();
}
@Override
public @NonNull Cache getDriverCache(
@NonNull WebSource source,
@NonNull List persistences,
@Nullable EventListener super WebSource> onEvent,
@Nullable ErrorListener super WebSource> onError) {
return Cache.noOp();
}
@Override
public @NonNull Cache getMonitorCache(
@NonNull WebSource source,
@NonNull List persistences,
@Nullable EventListener super WebSource> onEvent,
@Nullable ErrorListener super WebSource> onError) {
return Cache.noOp();
}
@Override
public @NonNull Collection getFileCachingProperties() {
return Collections.emptyList();
}
@Override
public @NonNull Collection getWebCachingProperties() {
return Collections.emptyList();
}
}