All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.apple.foundationdb.NetworkOptions Maven / Gradle / Ivy

Go to download

Java bindings for the FoundationDB database. These bindings require the FoundationDB client, which is under a different license. The client can be obtained from https://www.foundationdb.org/download/.

There is a newer version: 7.3.63
Show newest version
package com.apple.foundationdb;

/**
 * A set of options that can be set globally for the {@link FDB FoundationDB API}.
 */
public class NetworkOptions extends OptionsSet {
	public NetworkOptions( OptionConsumer consumer ) { super(consumer); }

	/**
	 * Deprecated.
	 * 
	 * @param value IP:PORT
	 */
	@Deprecated
	public void setLocalAddress(String value) { setOption(10, value); }

	/**
	 * Deprecated.
	 * 
	 * @param value path to cluster file
	 */
	@Deprecated
	public void setClusterFile(String value) { setOption(20, value); }

	/**
	 * Enables trace output to a file in a directory of the clients choosing.
	 * 
	 * @param value path to output directory (or NULL for current working directory)
	 */
	public void setTraceEnable(String value) { setOption(30, value); }

	/**
	 * Sets the maximum size in bytes of a single trace output file. This value should be in the range {@code [0, INT64_MAX]}. If the value is set to 0, there is no limit on individual file size. The default is a maximum size of 10,485,760 bytes.
	 * 
	 * @param value max size of a single trace output file
	 */
	public void setTraceRollSize(long value) { setOption(31, value); }

	/**
	 * Sets the maximum size of all the trace output files put together. This value should be in the range {@code [0, INT64_MAX]}. If the value is set to 0, there is no limit on the total size of the files. The default is a maximum size of 104,857,600 bytes. If the default roll size is used, this means that a maximum of 10 trace files will be written at a time.
	 * 
	 * @param value max total size of trace files
	 */
	public void setTraceMaxLogsSize(long value) { setOption(32, value); }

	/**
	 * Sets the 'logGroup' attribute with the specified value for all events in the trace output files. The default log group is 'default'.
	 * 
	 * @param value value of the logGroup attribute
	 */
	public void setTraceLogGroup(String value) { setOption(33, value); }

	/**
	 * Set internal tuning or debugging knobs.
	 * 
	 * @param value knob_name=knob_value
	 */
	public void setKnob(String value) { setOption(40, value); }

	/**
	 * Set the TLS plugin to load. This option, if used, must be set before any other TLS options.
	 * 
	 * @param value file path or linker-resolved name
	 */
	public void setTLSPlugin(String value) { setOption(41, value); }

	/**
	 * Set the certificate chain.
	 * 
	 * @param value certificates
	 */
	public void setTLSCertBytes(byte[] value) { setOption(42, value); }

	/**
	 * Set the file from which to load the certificate chain.
	 * 
	 * @param value file path
	 */
	public void setTLSCertPath(String value) { setOption(43, value); }

	/**
	 * Set the private key corresponding to your own certificate.
	 * 
	 * @param value key
	 */
	public void setTLSKeyBytes(byte[] value) { setOption(45, value); }

	/**
	 * Set the file from which to load the private key corresponding to your own certificate.
	 * 
	 * @param value file path
	 */
	public void setTLSKeyPath(String value) { setOption(46, value); }

	/**
	 * Set the peer certificate field verification criteria.
	 * 
	 * @param value verification pattern
	 */
	public void setTLSVerifyPeers(byte[] value) { setOption(47, value); }

	/**
	 * Set the probability of a BUGGIFY section being active for the current execution.  Only applies to code paths first traversed AFTER this option is changed.
	 * 
	 * @param value probability expressed as a percentage between 0 and 100
	 */
	public void setBuggifySectionActivatedProbability(long value) { setOption(50, value); }

	/**
	 * Set the probability of an active BUGGIFY section being fired.
	 * 
	 * @param value probability expressed as a percentage between 0 and 100
	 */
	public void setBuggifySectionFiredProbability(long value) { setOption(51, value); }

	/**
	 * Set the ca bundle.
	 * 
	 * @param value ca bundle
	 */
	public void setTLSCaBytes(byte[] value) { setOption(52, value); }

	/**
	 * Set the file from which to load the certificate authority bundle.
	 * 
	 * @param value file path
	 */
	public void setTLSCaPath(String value) { setOption(53, value); }

	/**
	 * Set the passphrase for encrypted private key. Password should be set before setting the key for the password to be used.
	 * 
	 * @param value key passphrase
	 */
	public void setTLSPassword(String value) { setOption(54, value); }

	/**
	 * Disables the multi-version client API and instead uses the local client directly. Must be set before setting up the network.
	 */
	public void setDisableMultiVersionClientApi() { setOption(60); }

	/**
	 * If set, callbacks from external client libraries can be called from threads created by the FoundationDB client library. Otherwise, callbacks will be called from either the thread used to add the callback or the network thread. Setting this option can improve performance when connected using an external client, but may not be safe to use in all environments. Must be set before setting up the network. WARNING: This feature is considered experimental at this time.
	 */
	public void setCallbacksOnExternalThreads() { setOption(61); }

	/**
	 * Adds an external client library for use by the multi-version client API. Must be set before setting up the network.
	 * 
	 * @param value path to client library
	 */
	public void setExternalClientLibrary(String value) { setOption(62, value); }

	/**
	 * Searches the specified path for dynamic libraries and adds them to the list of client libraries for use by the multi-version client API. Must be set before setting up the network.
	 * 
	 * @param value path to directory containing client libraries
	 */
	public void setExternalClientDirectory(String value) { setOption(63, value); }

	/**
	 * Prevents connections through the local client, allowing only connections through externally loaded client libraries. Intended primarily for testing.
	 */
	public void setDisableLocalClient() { setOption(64); }

	/**
	 * Disables logging of client statistics, such as sampled transaction activity.
	 */
	public void setDisableClientStatisticsLogging() { setOption(70); }

	/**
	 * Enables debugging feature to perform slow task profiling. Requires trace logging to be enabled. WARNING: this feature is not recommended for use in production.
	 */
	public void setEnableSlowTaskProfiling() { setOption(71); }

	public void setBuggifyEnable() { setOption(48); }

	public void setBuggifyDisable() { setOption(49); }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy