@ApplicationScoped public class KafkaRegistryStorage extends SimpleMapRegistryStorage implements KafkaRegistryStorageHandle
artifactRules, global, globalRules, storage
Constructor and Description |
---|
KafkaRegistryStorage() |
createArtifactRulesMap, createGlobalMap, createGlobalRulesMap, createStorageMap
createOrUpdateArtifact, getArtifact, getArtifactIds, getArtifactMetaData, getArtifactMetaData, getArtifactMetaData, getArtifactRule, getArtifactRules, getArtifactVersion, getArtifactVersion, getArtifactVersionMetaData, getArtifactVersions, getContentMap, getGlobalRule, getGlobalRules, init, lookupFn, rulesLookupFn, toStoredArtifact
protected long nextGlobalId()
nextGlobalId
in class AbstractMapRegistryStorage
protected void afterInit()
afterInit
in class AbstractMapRegistryStorage
public String registryTopic()
registryTopic
in interface KafkaRegistryStorageHandle
public String snapshotTopic()
snapshotTopic
in interface KafkaRegistryStorageHandle
public void loadSnapshot(StorageSnapshot snapshot)
loadSnapshot
in interface KafkaRegistryStorageHandle
public void start()
start
in interface KafkaRegistryStorageHandle
public void stop()
stop
in interface KafkaRegistryStorageHandle
public void consumeStorageValue(org.apache.kafka.clients.consumer.ConsumerRecord<Cmmn.UUID,Str.StorageValue> record)
consumeStorageValue
in interface KafkaRegistryStorageHandle
public CompletionStage<ArtifactMetaDataDto> createArtifact(String artifactId, ArtifactType artifactType, String content) throws ArtifactAlreadyExistsException, RegistryStorageException
createArtifact
in interface RegistryStorage
createArtifact
in class AbstractMapRegistryStorage
ArtifactAlreadyExistsException
RegistryStorageException
public SortedSet<Long> deleteArtifact(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
deleteArtifact
in interface RegistryStorage
deleteArtifact
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RegistryStorageException
public CompletionStage<ArtifactMetaDataDto> updateArtifact(String artifactId, ArtifactType artifactType, String content) throws ArtifactNotFoundException, RegistryStorageException
updateArtifact
in interface RegistryStorage
updateArtifact
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RegistryStorageException
public void deleteArtifactVersion(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
deleteArtifactVersion
in interface RegistryStorage
deleteArtifactVersion
in class AbstractMapRegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public void updateArtifactMetaData(String artifactId, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, RegistryStorageException
updateArtifactMetaData
in interface RegistryStorage
updateArtifactMetaData
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RegistryStorageException
public void createArtifactRule(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleAlreadyExistsException, RegistryStorageException
createArtifactRule
in interface RegistryStorage
createArtifactRule
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RuleAlreadyExistsException
RegistryStorageException
public void deleteArtifactRules(String artifactId) throws ArtifactNotFoundException, RegistryStorageException
deleteArtifactRules
in interface RegistryStorage
deleteArtifactRules
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RegistryStorageException
public void updateArtifactRule(String artifactId, RuleType rule, RuleConfigurationDto config) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
updateArtifactRule
in interface RegistryStorage
updateArtifactRule
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
public void deleteArtifactRule(String artifactId, RuleType rule) throws ArtifactNotFoundException, RuleNotFoundException, RegistryStorageException
deleteArtifactRule
in interface RegistryStorage
deleteArtifactRule
in class AbstractMapRegistryStorage
ArtifactNotFoundException
RuleNotFoundException
RegistryStorageException
public void updateArtifactVersionMetaData(String artifactId, long version, EditableArtifactMetaDataDto metaData) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
updateArtifactVersionMetaData
in interface RegistryStorage
updateArtifactVersionMetaData
in class AbstractMapRegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public void deleteArtifactVersionMetaData(String artifactId, long version) throws ArtifactNotFoundException, VersionNotFoundException, RegistryStorageException
deleteArtifactVersionMetaData
in interface RegistryStorage
deleteArtifactVersionMetaData
in class AbstractMapRegistryStorage
ArtifactNotFoundException
VersionNotFoundException
RegistryStorageException
public void createGlobalRule(RuleType rule, RuleConfigurationDto config) throws RuleAlreadyExistsException, RegistryStorageException
createGlobalRule
in interface RegistryStorage
createGlobalRule
in class AbstractMapRegistryStorage
RuleAlreadyExistsException
RegistryStorageException
public void deleteGlobalRules() throws RegistryStorageException
deleteGlobalRules
in interface RegistryStorage
deleteGlobalRules
in class AbstractMapRegistryStorage
RegistryStorageException
public void updateGlobalRule(RuleType rule, RuleConfigurationDto config) throws RuleNotFoundException, RegistryStorageException
updateGlobalRule
in interface RegistryStorage
updateGlobalRule
in class AbstractMapRegistryStorage
RuleNotFoundException
RegistryStorageException
public void deleteGlobalRule(RuleType rule) throws RuleNotFoundException, RegistryStorageException
deleteGlobalRule
in interface RegistryStorage
deleteGlobalRule
in class AbstractMapRegistryStorage
RuleNotFoundException
RegistryStorageException
Copyright © 2019 Red Hat. All rights reserved.