sdmxdl.ext.Persistence 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 sdmxdl.ext;
import internal.sdmxdl.NoOpPersistence;
import lombok.NonNull;
import nbbrd.design.StaticFactoryMethod;
import nbbrd.design.ThreadSafe;
import nbbrd.service.Quantifier;
import nbbrd.service.ServiceDefinition;
import nbbrd.service.ServiceId;
import nbbrd.service.ServiceSorter;
import sdmxdl.HasPersistence;
import java.util.Set;
@ServiceDefinition(
quantifier = Quantifier.MULTIPLE,
loaderName = "internal.{{canonicalName}}Loader"
)
@ThreadSafe
public interface Persistence {
@ServiceId(pattern = ServiceId.SCREAMING_SNAKE_CASE)
@NonNull String getPersistenceId();
@ServiceSorter(reverse = true)
int getPersistenceRank();
@NonNull Set> getFormatSupportedTypes();
@NonNull FileFormat getFormat(@NonNull Class type);
int UNKNOWN_PERSISTENCE_RANK = -1;
@StaticFactoryMethod
static @NonNull Persistence noOp() {
return NoOpPersistence.INSTANCE;
}
}