@ApplicationScoped @Counted(name="storage_operation_count", description="Total number of storage operations.", tags={"group=STORAGE","metric=storage_operation_count"}) @ConcurrentGauge(name="concurrent_operation_count", description="Number of concurrent storage operations.", tags={"group=STORAGE","metric=concurrent_operation_count"}) @Timed(name="storage_operation_time", description="Time for a storage operation to process.", tags={"group=STORAGE","metric=storage_operation_time"}, unit="milliseconds") public class StreamsRegistryStorage extends Object implements RegistryStorage
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_RULES_ID |
Constructor and Description |
---|
StreamsRegistryStorage() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createArtifactRule
public static final String GLOBAL_RULES_ID
public boolean isReady()
isReady
in interface RegistryStorage
public boolean isAlive()
isAlive
in interface RegistryStorage
public void updateArtifactState(String artifactId, ArtifactState state)
updateArtifactState
in interface RegistryStorage
public void updateArtifactState(String artifactId, ArtifactState state, Integer version)
updateArtifactState
in interface RegistryStorage
public CompletionStage<ArtifactMetaDataDto> createArtifact(String artifactId, ArtifactType artifactType, ContentHandle content) throws ArtifactAlreadyExistsException, RegistryStorageException
createArtifact
in interface RegistryStorage
ArtifactAlreadyExistsException
RegistryStorageException
public SortedSet<Long> deleteArtifact(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
deleteArtifact
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public StoredArtifact getArtifact(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
getArtifact
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public CompletionStage<ArtifactMetaDataDto> updateArtifact(String artifactId, ArtifactType artifactType, ContentHandle content) throws ArtifactNotFoundException, RegistryStorageException
updateArtifact
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public Set<String> getArtifactIds(Integer limit)
getArtifactIds
in interface RegistryStorage
public io.apicurio.registry.rest.beans.ArtifactSearchResults searchArtifacts(String search, int offset, int limit, io.apicurio.registry.rest.beans.SearchOver searchOver, io.apicurio.registry.rest.beans.SortOrder sortOrder)
searchArtifacts
in interface RegistryStorage
public ArtifactMetaDataDto getArtifactMetaData(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
getArtifactMetaData
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public ArtifactMetaDataDto getArtifactMetaData(String artifactId, ContentHandle content) throws ArtifactNotFoundException, RegistryStorageException
getArtifactMetaData
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public ArtifactMetaDataDto getArtifactMetaData(long id) throws ArtifactNotFoundException, RegistryStorageException
getArtifactMetaData
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public void updateArtifactMetaData(String artifactId, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, RegistryStorageException
updateArtifactMetaData
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public List<RuleType> getArtifactRules(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
getArtifactRules
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public CompletionStage<Void> createArtifactRuleAsync(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleAlreadyExistsException, RegistryStorageException
createArtifactRuleAsync
in interface RegistryStorage
ArtifactNotFoundException
RuleAlreadyExistsException
RegistryStorageException
public void deleteArtifactRules(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
deleteArtifactRules
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public void deleteArtifactRulesInternal(String artifactId)
public RuleConfigurationDto getArtifactRule(String artifactId, RuleType rule) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
getArtifactRule
in interface RegistryStorage
ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
public void updateArtifactRule(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
updateArtifactRule
in interface RegistryStorage
ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
public void deleteArtifactRule(String artifactId, RuleType rule) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
deleteArtifactRule
in interface RegistryStorage
ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
public SortedSet<Long> getArtifactVersions(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
getArtifactVersions
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public io.apicurio.registry.rest.beans.VersionSearchResults searchVersions(String artifactId, int offset, int limit)
searchVersions
in interface RegistryStorage
public StoredArtifact getArtifactVersion(long id) throws ArtifactNotFoundException, RegistryStorageException
getArtifactVersion
in interface RegistryStorage
ArtifactNotFoundException
RegistryStorageException
public StoredArtifact getArtifactVersion(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
getArtifactVersion
in interface RegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public void deleteArtifactVersion(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
deleteArtifactVersion
in interface RegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public ArtifactVersionMetaDataDto getArtifactVersionMetaData(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
getArtifactVersionMetaData
in interface RegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public void updateArtifactVersionMetaData(String artifactId, long version, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
updateArtifactVersionMetaData
in interface RegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public void deleteArtifactVersionMetaData(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
deleteArtifactVersionMetaData
in interface RegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public List<RuleType> getGlobalRules() throws RegistryStorageException
getGlobalRules
in interface RegistryStorage
RegistryStorageException
public void createGlobalRule(RuleType rule, RuleConfigurationDto config) throws RuleAlreadyExistsException, RegistryStorageException
createGlobalRule
in interface RegistryStorage
RuleAlreadyExistsException
RegistryStorageException
public void deleteGlobalRules() throws RegistryStorageException
deleteGlobalRules
in interface RegistryStorage
RegistryStorageException
public RuleConfigurationDto getGlobalRule(RuleType rule) throws RuleNotFoundException, RegistryStorageException
getGlobalRule
in interface RegistryStorage
RuleNotFoundException
RegistryStorageException
public void updateGlobalRule(RuleType rule, RuleConfigurationDto config) throws RuleNotFoundException, RegistryStorageException
updateGlobalRule
in interface RegistryStorage
RuleNotFoundException
RegistryStorageException
public void deleteGlobalRule(RuleType rule) throws RuleNotFoundException, RegistryStorageException
deleteGlobalRule
in interface RegistryStorage
RuleNotFoundException
RegistryStorageException
Copyright © 2020 Red Hat. All rights reserved.