Class DBBackedCustomDataStorage
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.DBBackedCustomDataStorage
-
public class DBBackedCustomDataStorage extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDBBackedCustomDataStorage.Encoding
-
Field Summary
Fields Modifier and Type Field Description static StringCUSTOM_DATA_STORAGE_REMOVE_DATA_DOMAINS_PART_SIZEstatic intMAX_DATA_PART_SIZEstatic StringPSQL_DEAD_TUPLES_THRESHOLD_PROPstatic StringPSQL_VACUUM_CHECK_INTERVAL_PROPstatic StringSTORAGE_MIN_PARTS_FOR_GZIP_ENCODING
-
Constructor Summary
Constructors Constructor Description DBBackedCustomDataStorage(SQLRunnerEx sqlRunner, TimeService timeService, NumericIdSequences sequences, String dataDomain, CustomDataStorageAsyncFlushService asyncFlushService, ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()voiddisposeObsoleteEmptyStorages()static Set<String>findAllStorageIdsByPatterns(SQLRunnerEx sqlRunner, Map<String,List<String>> dataDomainMapPatterns)voidflushAll()CustomDataStoragegetCustomDataStorage(String id)Set<String>getStoragesIdsWithPrefix(String idPrefix)static voidperformUptodateCheck(SQLRunnerEx sqlRunner, Collection<DBBackedCustomDataStorage> storages, long minUpdateThreshold, BooleanSupplier interrupted)static voidremoveCustomData(SQLRunnerEx sqlRunner, Map<String,List<String>> dataDomainMap, boolean exactMatch)Removes custom data storages for the defined map of data domain and data key prefixes.static voidremoveGarbage(SQLRunnerEx sqlRunner, TimeService timeService)static voidremoveNonExistingDomains(SQLRunnerEx sqlRunner, TimeService timeService, String domainPrefix)StringtoString()Pair<Integer,Integer>unloadUnused()
-
-
-
Field Detail
-
MAX_DATA_PART_SIZE
public static final int MAX_DATA_PART_SIZE
- See Also:
- Constant Field Values
-
STORAGE_MIN_PARTS_FOR_GZIP_ENCODING
public static final String STORAGE_MIN_PARTS_FOR_GZIP_ENCODING
- See Also:
- Constant Field Values
-
PSQL_DEAD_TUPLES_THRESHOLD_PROP
public static final String PSQL_DEAD_TUPLES_THRESHOLD_PROP
- See Also:
- Constant Field Values
-
PSQL_VACUUM_CHECK_INTERVAL_PROP
public static final String PSQL_VACUUM_CHECK_INTERVAL_PROP
- See Also:
- Constant Field Values
-
CUSTOM_DATA_STORAGE_REMOVE_DATA_DOMAINS_PART_SIZE
public static final String CUSTOM_DATA_STORAGE_REMOVE_DATA_DOMAINS_PART_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DBBackedCustomDataStorage
public DBBackedCustomDataStorage(@NotNull SQLRunnerEx sqlRunner, @NotNull TimeService timeService, @NotNull NumericIdSequences sequences, @NotNull String dataDomain, @NotNull CustomDataStorageAsyncFlushService asyncFlushService, @NotNull ServerResponsibility serverResponsibility)
-
-
Method Detail
-
getCustomDataStorage
@NotNull public CustomDataStorage getCustomDataStorage(@NotNull String id)
-
getStoragesIdsWithPrefix
@NotNull public Set<String> getStoragesIdsWithPrefix(@NotNull String idPrefix)
-
flushAll
public void flushAll()
-
disposeObsoleteEmptyStorages
public void disposeObsoleteEmptyStorages()
-
performUptodateCheck
public static void performUptodateCheck(@NotNull SQLRunnerEx sqlRunner, @NotNull Collection<DBBackedCustomDataStorage> storages, long minUpdateThreshold, @NotNull BooleanSupplier interrupted)
-
dispose
public void dispose()
-
removeGarbage
public static void removeGarbage(@NotNull SQLRunnerEx sqlRunner, @NotNull TimeService timeService)
-
removeNonExistingDomains
public static void removeNonExistingDomains(@NotNull SQLRunnerEx sqlRunner, @NotNull TimeService timeService, @NotNull String domainPrefix)
-
removeCustomData
public static void removeCustomData(@NotNull SQLRunnerEx sqlRunner, @NotNull Map<String,List<String>> dataDomainMap, boolean exactMatch)Removes custom data storages for the defined map of data domain and data key prefixes.- Parameters:
sqlRunner- sql runnerdataDomainMap- map from data domain to a list of data keysexactMatch- if true then the data will be removed by exact match of the data domain and data key, if false then data key is treated as a prefix and resulting SQL query will use 'like' keyword with this prefix
-
findAllStorageIdsByPatterns
@NotNull public static Set<String> findAllStorageIdsByPatterns(@NotNull SQLRunnerEx sqlRunner, @NotNull Map<String,List<String>> dataDomainMapPatterns)
-
-