# Refiner configuration

Here are the definitions of [Refiner’s](transformer-refiner-overview.md) configuration properties.

## Modifying a property

To modify a property, add its new value to the file: `<Framework-root>/global_config/overrides/RefinerService/Transformer/etc/refiner.properties` (`<Framework-root>` is the topmost directory of the [Deployment Framework](../deployment-framework/index.md).)

The format of a property is a dot-separated property name with an associated value, like this:

```
property.name1[.name2][.name3]...=value
```

For example:

```
batch.time=100
log.file.count=3
```

## Refiner properties

The Refiner configuration properties are:

* **batch.time**

  ***Default***: `0`

  The duration in milliseconds for which Caplin Refiner waits before publishing any changes it has received since the last time it published.

  The default value causes Caplin Refiner to immediately publish any new updates as soon as it has finished publishing the previous batch.

  If `batch.time` is negative or not a number, the default value is used.

  Run Caplin Refiner initially with the default setting for `batch.time` (no batching of updates). If, in your system, the rate at which Caplin Refiner has to publish updates causes performance problems with Caplin Refiner itself or for clients, increase `batch.time` as required to give acceptable performance.

  Also see, [`max.update.size`](#max-update-size).
* **filtering.algorithm.__filter-name__**

  **Default**: _none_

  Defines a custom filter comparator.

  `_filter-name_` is the name of the custom filter comparator.

  You can define multiple custom filter comparators; each `filtering.algorithm.<filter-name>` must have a unique `<filter-name>`. The property value is the fully qualified class name of the custom filter comparator class.

  For example: `filtering.algorithm.BondRating=com.example.BondRatingComparator`
* **log.file.count**

  **Default**: 1 (&lt; v7.1.4), 5 (>= v7.1.4)

  When `log.file.count` = 0, logging is disabled.

  When `log.file.count` = 1, log messages are written to `refiner.log` and the following cycling rules apply:

  * If [`log.file.limit`](#log-file-limit) = 0, then `refiner.log` is not cycled and grows without limit.
  * If [`log.file.limit`](#log-file-limit) > 0, then `refiner.log` is cycled when it exceeds `log.file.limit` bytes in size and the archived log is discarded.

  When `log.file.count` > 1, log messages are written to `refiner.log.0` and the following cycling rules apply:

  * If [`log.file.limit`](#log-file-limit) = 0, `refiner.log.0` is not cycled and grows without limit.
  * If [`log.file.limit`](#log-file-limit) > 0, then the `refiner.log.0` and any archived logs are cycled when `refiner.log.0` exceeds `log.file.limit` bytes in size. Log files are cycled by incrementing their filename suffix (`refiner.log.__n__`) by 1, beginning with the oldest log file. When all files have been renamed, a new `refiner.log.0` file is created. If the number of log files now exceeds `log.file.count`, then the oldest log file is deleted.
* **log.file.level**

  **Default**: `CONFIG`

  Defines the log level for messages written to the Caplin Refiner log file. The log levels are the standard Java ones:

  * `SEVERE` (highest level)
  * `WARNING`
  * `INFO`
  * `CONFIG`
  * `FINE`
  * `FINER`
  * `FINEST` (lowest level)
* **log.file.limit**

  **Default**: `0` (&lt; v7.1.4), `268435456` (>= v7.1.4)

  The maximum size of a Caplin Refiner log file in bytes.

  When `log-file-limit` = 0, the current log file is not cycled and grows without limit.

  When `log-file-limit` > 0, the current log file is cycled when it exceeds `log-file-limit` bytes in size. We recommend that this setting is used in conjunction with [`log-file-count`](#log-file-count) set to 2 or greater.
* **max.update.size**

  **Default**: `1000`

  As Transformer receives updates to the records in a container, it creates (via Caplin Refiner) individual container record removal and record insertion messages according to how the updates match the filter and sort criteria. If the resulting number of record insertions is high, this can load the Liberator excessively.

  The `max.update.size` property helps to reduce such loading on the Liberator. It defines the maximum number of container record inserts that Caplin Refiner sends in a single batch period (as defined by [batch.time](#batch-time)). If the number of updates exceeds `max.update.size`, Transformer sends the changes as a single container image instead.

  If `max.update.size` is negative, 0 or not a number, this feature is turned off and all updates are sent as inserts.
* **nodata.records.rerequest.timer**

  **Default**: `60000`

  The period in milliseconds between re-requests made by Caplin Refiner for any records that were not previously successfully subscribed to on a supplying DataSource.

  If `nodata.records.rerequest.timer` is negative, 0, or not a number, this feature is turned off.
* **placeholder.timeout**

  **Default**: `1000`

  How long in milliseconds Caplin Refiner waits for results before removing the placeholder record.

  The placeholder record has a special name that allows the client to display an indicator showing that it’s waiting for data. When the placeholder is removed, the client should remove the indicator.

  If `placeholder.timeout` is negative or not a number, the default value is used.

  For more about container placeholders, see [The container placeholder](transformer-refiner-filtering-and-sorting-rules.md#the-container-placeholder) in How can I... [Filter and Sort in Refiner](transformer-refiner-filtering-and-sorting-rules.md).
* **sorting.algorithm.__sort-name__**

  **Default**: _none_

  Defines a custom sort list or custom sort comparator.

  `_sort-name_` is the name of the custom sort.

  You can define multiple custom sort lists and sort comparators; each `sorting.algorithm.<sort-name>` must have a unique `<sort-name>`. For custom sort lists, the property value is a list of sort attributes of the form `list: <item1>,<item2>,...` in ascending sort order.

  For example: `sorting.algorithm.TenorSort=list:SPOT,ON,TN,SN,1W,2W,1M,2M,6M,1Y`

  For custom sort comparators, the property value is of the form class: `<comparator-class>` where `<comparator-class>` is the fully qualified class name of the custom comparator class.

  For example: `sorting.algorithm.BondRating=class:com.example.BondRatingComparator`.
* **placeholder.enabled**

  **Default:** `true`

  Determines whether Caplin Refiner returns a placeholder record when it receives a request for a container that is not in the cache.

  When enabled, a placeholder record (with a special name) is returned so the client can display an indicator showing that it is waiting for data; the placeholder is removed once data arrives or after [`placeholder.timeout`](#placeholder-timeout).
* **refiner.prefix**

  **Default:** `/FILTER`

  The subject prefix used by Caplin Refiner.
* **refiner.log**

  **Default:** `refiner.log`

  The filename of the Refiner log file.

* **executor.pool.size**

  **Default:** num_processors - 1 | **Minimum:** 1

  The size of the executor thread pool used for processing container updates for the underlying containers.
* **list.regexes**

  **Default:** _none_

  A comma-separated list of regular expressions defining which subjects are treated as List objects.

  If a requested subject matches any of the regular expressions in this list, it is treated as a List object and returns a List placeholder if data is not immediately available.

  **Example**

  ```
  list.regexes=/FILTER/LIST_.* , /FILTER/LIST/.*
  ```

---

**See also:**

* [Refiner overview](transformer-refiner-overview.md)
* How can I... [Deploy the refiner service module](transformer-deploy-the-refiner-service-module.md)
* How can I... [Filter and sort in Refiner](transformer-refiner-filtering-and-sorting-rules.md)
