Class RegistryConfig
This class does not represent the total configuration of the Nomulus service. It's only
meant for settings that need to be configured once. Settings which may be subject to
change in the future, should instead be retrieved from the database. The Tld
class is one such example of this.
Note: Only settings that are actually configurable belong in this file. It's not a catch-all for anything widely used throughout the code base.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Dagger qualifier for configuration settings.static final class
Dagger module for providing configuration settings. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Supplier
<RegistryConfigSettings> Memoizes loading of theRegistryConfigSettings
POJO. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static URL
Returns the address of the Nomulus app backend HTTP server.static String
static URL
Returns the address of the Nomulus app bsa HTTP server.static Duration
Returns the amount of time that a particular claims list should be cached.static String
Returns the roid suffix to be used for the roids of all contacts and hosts.static org.joda.time.Duration
Returns the global automatic transfer length for contacts.static org.joda.time.Duration
Returns the length of time before commit logs should be deleted from the database.static String
Returns default WHOIS server to use whenRegistrar#getWhoisServer()
isnull
.static URL
Returns the address of the Nomulus app default HTTP server.static Duration
Returns the amount of time a domain label list should be cached in memory before expiring.static Duration
Returns the amount of time an EPP resource or key should be cached in memory before expiring.static int
Returns the maximum number of EPP resources and keys to keep in in-memory cache.static jakarta.mail.internet.InternetAddress
Returns the email address that outgoing emails from the app are sent from.static String
Returns the display name that outgoing emails from the app are sent from.static boolean
Returns true if nested calls totm().transact()
are allowed.static String
Returns the default database transaction isolation.static String
Returns the connection timeout for HikariCP.static String
Returns the idle timeout for HikariCP.static String
Returns the maximum pool size for HikariCP.static String
Returns the minimum idle connections for HikariCP.static int
JDBC-specific: driver default batch size is 0, which means that every INSERT statement will be sent to the database individually.static String
Returns the JDBC fetch size.static String
Returns true if hibernate.show_sql is enabled.static com.google.common.collect.ImmutableSet
<String> Set of registrars for which we do not send poll messages on standard domain deletion.static String
Returns the App Engine project ID, which is based off the environment name.static URL
Returns the address of the Nomulus app pubapi HTTP server.static URL
getServiceUrl
(Action.GkeService service) static Duration
Returns the amount of time a singleton should be cached in persist mode, before expiring.static Duration
Returns the amount of time a singleton should be cached, before expiring.static int
Returns the maximum number of premium list entries across all TLDs to keep in in-memory cache.static double
A discount for all sunrise domain creates, between 0.0 (no discount) and 1.0 (free).static com.google.common.collect.ImmutableSet
<String> List of registrars for which we include a promotional price on domain checks if configured.static URL
Returns the address of the Nomulus app tools HTTP server.static boolean
static void
overrideIsEppResourceCachingEnabledForTesting
(boolean enabled)
-
Field Details
-
CONFIG_SETTINGS
Memoizes loading of theRegistryConfigSettings
POJO.Memoizing without cache expiration is used because the app must be re-deployed in order to change the contents of the YAML config files.
-
-
Method Details
-
getProjectId
Returns the App Engine project ID, which is based off the environment name. -
getDatabaseRetention
public static org.joda.time.Duration getDatabaseRetention()Returns the length of time before commit logs should be deleted from the database.- See Also:
-
areServersLocal
public static boolean areServersLocal() -
getBaseDomain
-
getServiceUrl
-
getDefaultServer
Returns the address of the Nomulus app default HTTP server.This is used by the
nomulus
tool to connect to the App Engine remote API. -
getBackendServer
Returns the address of the Nomulus app backend HTTP server.This is used by the
nomulus
tool to connect to the App Engine remote API. -
getBsaServer
Returns the address of the Nomulus app bsa HTTP server.This is used by the
nomulus
tool to connect to the App Engine remote API. -
getToolsServer
Returns the address of the Nomulus app tools HTTP server.This is used by the
nomulus
tool to connect to the App Engine remote API. -
getPubapiServer
Returns the address of the Nomulus app pubapi HTTP server.This is used by the
nomulus
tool to connect to the App Engine remote API. -
getSingletonCacheRefreshDuration
Returns the amount of time a singleton should be cached, before expiring. -
getDomainLabelListCacheDuration
Returns the amount of time a domain label list should be cached in memory before expiring.- See Also:
-
getSingletonCachePersistDuration
Returns the amount of time a singleton should be cached in persist mode, before expiring. -
getStaticPremiumListMaxCachedEntries
public static int getStaticPremiumListMaxCachedEntries()Returns the maximum number of premium list entries across all TLDs to keep in in-memory cache. -
isEppResourceCachingEnabled
public static boolean isEppResourceCachingEnabled() -
overrideIsEppResourceCachingEnabledForTesting
public static void overrideIsEppResourceCachingEnabledForTesting(boolean enabled) -
getEppResourceCachingDuration
Returns the amount of time an EPP resource or key should be cached in memory before expiring. -
getEppResourceMaxCachedEntries
public static int getEppResourceMaxCachedEntries()Returns the maximum number of EPP resources and keys to keep in in-memory cache. -
getClaimsListCacheDuration
Returns the amount of time that a particular claims list should be cached. -
getGSuiteOutgoingEmailAddress
public static jakarta.mail.internet.InternetAddress getGSuiteOutgoingEmailAddress()Returns the email address that outgoing emails from the app are sent from. -
getGSuiteOutgoingEmailDisplayName
Returns the display name that outgoing emails from the app are sent from. -
getDefaultRegistrarWhoisServer
Returns default WHOIS server to use whenRegistrar#getWhoisServer()
isnull
.- See Also:
-
getHibernateConnectionIsolation
Returns the default database transaction isolation. -
getHibernateAllowNestedTransactions
public static boolean getHibernateAllowNestedTransactions()Returns true if nested calls totm().transact()
are allowed. -
getHibernateLogSqlQueries
Returns true if hibernate.show_sql is enabled. -
getHibernateHikariConnectionTimeout
Returns the connection timeout for HikariCP. -
getHibernateHikariMinimumIdle
Returns the minimum idle connections for HikariCP. -
getHibernateHikariMaximumPoolSize
Returns the maximum pool size for HikariCP. -
getHibernateHikariIdleTimeout
Returns the idle timeout for HikariCP. -
getHibernateJdbcBatchSize
public static int getHibernateJdbcBatchSize()JDBC-specific: driver default batch size is 0, which means that every INSERT statement will be sent to the database individually. Batching allows us to group together multiple inserts into one single INSERT statement which can dramatically increase speed in situations with many inserts.Hibernate User Guide recommends between 10 and 50.
-
getHibernateJdbcFetchSize
Returns the JDBC fetch size.Postgresql-specific: driver default fetch size is 0, which disables streaming result sets. Here we set a small default geared toward Nomulus server transactions. Large queries can override the defaults using
JpaTransactionManager.setQueryFetchSize(jakarta.persistence.Query, int)
. -
getContactAndHostRoidSuffix
Returns the roid suffix to be used for the roids of all contacts and hosts. -
getContactAutomaticTransferLength
public static org.joda.time.Duration getContactAutomaticTransferLength()Returns the global automatic transfer length for contacts. -
getSunriseDomainCreateDiscount
public static double getSunriseDomainCreateDiscount()A discount for all sunrise domain creates, between 0.0 (no discount) and 1.0 (free). -
getTieredPricingPromotionRegistrarIds
public static com.google.common.collect.ImmutableSet<String> getTieredPricingPromotionRegistrarIds()List of registrars for which we include a promotional price on domain checks if configured.In these cases, when a default promotion is running for the domain+registrar combination in question (a DEFAULT_PROMO token is set on the TLD), the standard non-promotional price will be returned for that domain as the standard create price. We will then add an additional fee check response with the actual promotional price and a "STANDARD PROMOTION" class.
-
getNoPollMessageOnDeletionRegistrarIds
public static com.google.common.collect.ImmutableSet<String> getNoPollMessageOnDeletionRegistrarIds()Set of registrars for which we do not send poll messages on standard domain deletion.For these registrars we won't send a poll message in order to avoid database contention. See b/379331882 for more details.
-