Skip to main content
Version: Current

API reference - system definition API

The system-definition file is the basis of all configurations. In this page, we describe the different functions available to get properties specified in the system-definition.kts file. Default methods have implementations to provide default values for each property.

Most of the functions are to get or set a particular property.

If you add any other property whose getter or setter function is not available, use the functions get or getItem.

You can access system definition properties in two ways:

  • using existing APIs
  • using @Named Genesis annotation

Using existing APIs


namesignature
availableProperties@NotNull default Set<String> availableProperties()
determineEnvironment@NotNull default String determineEnvironment()
get@NotNull default Optional<String> get(String key)
getAeronArchiveEnabledFlagdefault Optional<Boolean> getAeronArchiveEnabledFlag()
getAeronIpRangedefault Optional<String> getAeronIpRange()
getAeronServicePortdefault Optional<Integer> getAeronServicePort()
getChronicleMapAverageKeySizeBytesdefault Optional<String> getChronicleMapAverageKeySizeBytes()
getChronicleMapAverageValueSizeBytesdefault Optional<String> getChronicleMapAverageValueSizeBytes()
getChronicleMapEntriesCountdefault Optional<String> getChronicleMapEntriesCount()
getDaemonServerPortdefault Optional<String> getDaemonServerPort()
getDatabaseHostnamedefault Optional<String> getDatabaseHostname()
getDatabasePortdefault Optional<String> getDatabasePort()
getDbNamespacedefault Optional<String> getDbNamespace()
getDefaultCertificateLocationdefault Optional<String> getDefaultCertificateLocation()
getDefaultKeystoreLocationdefault Optional<String> getDefaultKeystoreLocation()
getDefaultKeystorePassworddefault Optional<String> getDefaultKeystorePassword()
getHostdefault GenesisHost getHost(String hostName)
getHostsList<GenesisHost> getHosts()
getItem@Nullable Object getItem(String key)
getLogFrameworkdefault Optional<String> getLogFramework()
getLogFrameworkConfigdefault Optional<String> getLogFrameworkConfig()
getReqRepTimeoutdefault Optional<String> getReqRepTimeout()
getValueOrDefault@NotNull default String getValueOrDefault(String key, @NotNull String defaultValue)
getZeroMQInboundPortdefault Integer getZeroMQInboundPort()
getZeroMQOutboundPortdefault Integer getZeroMQOutboundPort()
getZeroMQProxyModeEnableddefault Boolean getZeroMQProxyModeEnabled()
getZeroMQUnicastRelayEnableddefault Boolean getZeroMQUnicastRelayEnabled()
isAuthDisableddefault boolean isAuthDisabled()
isClusteringEnableddefault boolean isClusteringEnabled()
isEncrypteddefault boolean isEncrypted(String key)
isMetricsEnabledboolean isMetricsEnabled()
parsePropertystatic <T, R> Optional<R> parseProperty(Supplier<Optional<T>> property, Predicate<? super T> canBeTransformed, Function<? super T, ? extends R> transformer)
parseStringPropertystatic <R> Optional<R> parseStringProperty(Supplier<Optional<String>> property, Function<? super String, ? extends R> transformer)

Using @Named genesis annotation


Injectable properties from system definition

Here is an example of a genesis-system-definition.kts file:

systemDefinition {
global {
item(name = "CONFIG_FILE_NAME", value = "/data/")
// other params omitted for simplicity
}
}

Here is an example of a system definition property being referenced in a Java file:

@Inject
public RequestReplyDefinitionReader(RxDb db,
@Named("CONFIG_FILE_NAME") String configFileName) throws GenesisConfigurationException {
this(db.getDictionary(), configFileName);
}