Class DefaultMetadataStorage
-
- All Implemented Interfaces:
-
com.jetbrains.fus.reporting.FusComponent,com.jetbrains.fus.reporting.MetadataStorage
public final class DefaultMetadataStorage<T extends Comparable<T>> implements MetadataStorage<T>
Creates a metadata storage that manages downloading, caching and serving validation metadata and dictionaries.
-
-
Constructor Summary
Constructors Constructor Description DefaultMetadataStorage(FusClientConfig config, MessageBus messageBus, FusLoggerFactory loggerFactory, RemoteConfig remoteConfig, FusHttpClient httpClient, FusJsonSerializer jsonSerializer, FileStorage fileStorage, FileStorage bundledFileStorage, MetadataUpdateDelay metadataUpdateDelay, EventLogBuildParser<T> buildParser, List<String> excludedFields, UtilRuleProducer utilRulesProducer, Set<String> skipAnonymizationIds)
-
Method Summary
Modifier and Type Method Description UnitscheduleUpdate()Booleanupdate()Unitreload()Set<String>getFieldsToAnonymize(String groupId, String eventId)Set<String>getSkipAnonymizationIds()IGroupValidators<T>getGroupValidators(String groupId)BooleanisUnreachable()RecorderDataValidationRulegetSystemDataRulesRevisions()RecorderDataValidationRulegetClientDataRulesRevisions()RecorderDataValidationRulegetIdsRulesRevisions()Unitclose()-
-
Constructor Detail
-
DefaultMetadataStorage
DefaultMetadataStorage(FusClientConfig config, MessageBus messageBus, FusLoggerFactory loggerFactory, RemoteConfig remoteConfig, FusHttpClient httpClient, FusJsonSerializer jsonSerializer, FileStorage fileStorage, FileStorage bundledFileStorage, MetadataUpdateDelay metadataUpdateDelay, EventLogBuildParser<T> buildParser, List<String> excludedFields, UtilRuleProducer utilRulesProducer, Set<String> skipAnonymizationIds)
- Parameters:
messageBus- bus used for publishing intra-component eventsloggerFactory- factory used to obtain a Logger for this storageremoteConfig- source of remote endpoints/URLs where metadata and dictionaries are fetched fromhttpClient- HTTP client used to perform remote requests for metadata and dictionariesjsonSerializer- deserializer used to read metadata JSON filesfileStorage- local storage used to persist downloaded/cached metadata and dictionariesbundledFileStorage- optional read-only storage with bundled metadata/dictionaries shipped with the app; used as a fallbackmetadataUpdateDelay- cadence for background metadata/dictionaries update attempts; defaults to 180 minutesbuildParser- parser that converts product build strings to comparable build objects used by validation metadataexcludedFields- fields that should be excluded from anonymization and validation rules when building validators; defaults to an empty listutilRulesProducer- factory that provides additional validation util rules; defaults to a rejecting producerskipAnonymizationIds- optional set of event/group identifiers for which anonymization should be skipped
-
-
Method Detail
-
scheduleUpdate
Unit scheduleUpdate()
-
getFieldsToAnonymize
Set<String> getFieldsToAnonymize(String groupId, String eventId)
-
getSkipAnonymizationIds
Set<String> getSkipAnonymizationIds()
-
getGroupValidators
IGroupValidators<T> getGroupValidators(String groupId)
-
isUnreachable
Boolean isUnreachable()
-
getSystemDataRulesRevisions
RecorderDataValidationRule getSystemDataRulesRevisions()
-
getClientDataRulesRevisions
RecorderDataValidationRule getClientDataRulesRevisions()
-
getIdsRulesRevisions
RecorderDataValidationRule getIdsRulesRevisions()
-
-
-
-