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

sdmxdl.ext.Persistence Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy