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 class
DBBackedCustomDataStorage.Encoding
-
Field Summary
Fields Modifier and Type Field Description static String
CUSTOM_DATA_STORAGE_REMOVE_DATA_DOMAINS_PART_SIZE
static int
MAX_DATA_PART_SIZE
static String
PSQL_DEAD_TUPLES_THRESHOLD_PROP
static String
PSQL_VACUUM_CHECK_INTERVAL_PROP
static String
STORAGE_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 void
dispose()
void
disposeObsoleteEmptyStorages()
static Set<String>
findAllStorageIdsByPatterns(SQLRunnerEx sqlRunner, Map<String,List<String>> dataDomainMapPatterns)
void
flushAll()
CustomDataStorage
getCustomDataStorage(String id)
Set<String>
getStoragesIdsWithPrefix(String idPrefix)
static void
performUptodateCheck(SQLRunnerEx sqlRunner, Collection<DBBackedCustomDataStorage> storages, long minUpdateThreshold, BooleanSupplier interrupted)
static void
removeCustomData(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 void
removeGarbage(SQLRunnerEx sqlRunner, TimeService timeService)
static void
removeNonExistingDomains(SQLRunnerEx sqlRunner, TimeService timeService, String domainPrefix)
String
toString()
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)
-
-