com.apple.foundationdb

## Class DatabaseOptions

- java.lang.Object
- - com.apple.foundationdb.DatabaseOptions

    public class DatabaseOptions
    extends java.lang.Object

A set of options that can be set on a `Database`.

### Constructor Summary

Constructors
Constructor and Description
`DatabaseOptions(OptionConsumer consumer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`OptionConsumer` `getOptionConsumer()` Returns the object on which these options are being set.
`void` `setDatacenterId(java.lang.String value)` Specify the datacenter ID that was passed to fdbserver processes running in the same datacenter as this client, for better location-aware load balancing.
`void` `setLocationCacheSize(long value)` Set the size of the client location cache.
`void` `setMachineId(java.lang.String value)` Specify the machine ID that was passed to fdbserver processes running on the same machine as this client, for better location-aware load balancing.
`void` `setMaxWatches(long value)` Set the maximum number of watches allowed to be outstanding on a database connection.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DatabaseOptions

    public DatabaseOptions(OptionConsumer consumer)

### Method Detail

#### setLocationCacheSize

    public void setLocationCacheSize(long value)

Set the size of the client location cache. Raising this value can boost performance in very large databases where clients access data in a near-random pattern. Defaults to 100000.

Parameters:
  `value` - Max location cache entries

#### setMaxWatches

    public void setMaxWatches(long value)

Set the maximum number of watches allowed to be outstanding on a database connection. Increasing this number could result in increased resource usage. Reducing this number will not cancel any outstanding watches. Defaults to 10000 and cannot be larger than 1000000.

Parameters:
  `value` - Max outstanding watches

#### setMachineId

    public void setMachineId(java.lang.String value)

Specify the machine ID that was passed to fdbserver processes running on the same machine as this client, for better location-aware load balancing.

Parameters:
  `value` - Hexadecimal ID

#### setDatacenterId

    public void setDatacenterId(java.lang.String value)

Specify the datacenter ID that was passed to fdbserver processes running in the same datacenter as this client, for better location-aware load balancing.

Parameters:
  `value` - Hexadecimal ID

#### getOptionConsumer

    public OptionConsumer getOptionConsumer()

Returns the object on which these options are being set. Rarely used by client code, since all options should be top-level methods on extending classes.

Returns:
  target of option set calls