/** * Set the connection port. * * @param port * @return this */ public ConnectionBuilder port(int port) { prefs.setPort(port); return this; }
/** * Return the value associated with the {@code environment} key. * * @return the environment */ public String getEnvironment() { return getOrDefault("environment", DEFAULT_ENVIRONMENT); }
/** * Set the value associated with the {@code buffer_directory} key. * * @param bufferDirectory */ public void setBufferDirectory(String bufferDirectory) { set("buffer_directory", bufferDirectory); }
/** * The absolute path to the directory where the Buffer data is stored. * For optimal write performance, the Buffer should be placed on a * separate disk partition (ideally a separate physical device) from * the database_directory. * * @return the buffer directory */ public String getBufferDirectory() { return getOrDefault("buffer_directory", DEFAULT_BUFFER_DIRECTORY); }
/** * Set the value associated with the {@code host} key. * * @param host */ public void setHost(String host) { set("host", host); }
/** * Set the connection host. * * @param host * @return this */ public ConnectionBuilder host(String host) { prefs.setHost(host); return this; }
/** * The size for each page in the Buffer. During reads, Buffer pages * are individually locked, so it is desirable to have several smaller * pages as opposed to few larger ones. Nevertheless, be sure to balance * the desire to maximize lock granularity with the risks of having too * many open buffer files simultaneously. * * @return the buffer page size in bytes */ public long getBufferPageSize() { return getSize("buffer_page_size", DEFAULT_BUFFER_PAGE_SIZE); }
/** * Return the client port for this server. * * @return the client port */ public int getClientPort() { return prefs.getClientPort(); }
/** * Set the value associated with the {@code buffer_page_size} key. */ public void setBufferPageSize(long sizeInBytes) { set("buffer_page_size", sizeInBytes); }
/** * The absolute path to the directory where the Database record and index * files are stored. For optimal performance, the Database should be * placed on a separate disk partition (ideally a separate physical device) * from the buffer_directory. * * @return the database directory */ public String getDatabaseDirectory() { return getOrDefault("database_directory", DEFAULT_DATABASE_DIRECTORY); }
/** * Return the value associated with the {@code username} key. * * @return the username */ public String getUsername() { return getOrDefault("username", DEFAULT_USERNAME); }
/** * Set the value associated with the {@code environment} key. * * @param environment */ public void setEnvironment(String environment) { set("environment", environment); }
/** * Set the value associated with the {@code default_environment} key. * * @param defaultEnvironment */ public void setDefaultEnvironment(String defaultEnvironment) { set("default_environment", defaultEnvironment); }
/** * The default environment that is automatically loaded when the server * starts and is used whenever a client does not specify an environment for * its connection. * * @return the default environment */ public String getDefaultEnvironment() { return getOrDefault("default_environment", DEFAULT_DEFAULT_ENVIRONMENT); }
/** * Return the value associated with the {@code host} key. * * @return the host */ public String getHost() { return getOrDefault("host", DEFAULT_HOST); }
/** * Set the value associated with the {@code database_directory} key. * * @param databaseDirectory */ public void setDatabaseDirectory(String databaseDirectory) { set("database_directory", databaseDirectory); }
/** * Determine whether log messages should also be printed to the console * (STDOUT). * * @return the determination whether to enable console logging */ public boolean getEnableConsoleLogging() { return getOrDefault("enable_console_logging", DEFAULT_ENABLE_CONSOLE_LOGGING); }
/** * Set the value associated with the {@code jmx_port} key. * * @param port */ public void setJmxPort(int port) { set("jmx_port", port); }
/** * The listener port (1-65535) for management commands via JMX. Choose a * port between 49152 and 65535 to minimize the possibility of conflicts * with other services on this host. * * @return the jmx port */ public int getJmxPort() { return getOrDefault("jmx_port", DEFAULT_JMX_PORT); }
/** * Set the value associated with the {@code shutdown_port} key. * * @param shutdownPort */ public void setShutdownPort(int shutdownPort) { set("shutdown_port", shutdownPort); }