51Degrees Pipeline for Java

fiftyone.caching.LruPutCache< K, V >.Builder Class Reference

Detailed Description

Implementation of CacheBuilder for LruPutCache caches.

Inheritance diagram for fiftyone.caching.LruPutCache< K, V >.Builder:

[legend]

Collaboration diagram for fiftyone.caching.LruPutCache< K, V >.Builder:

[legend]

Public Member Functions

Builder setConcurrency (int concurrency)
 Set the expected number of concurrent requests to the cache.
Builder setUpdateExisting (boolean update)
 Set whether or not an existing item in the cache should be updated with the value given to the put method.

Member Function Documentation

◆ setConcurrency()

Builder fiftyone.caching.LruPutCache< K, V >.Builder.setConcurrency ( int concurrency)

Set the expected number of concurrent requests to the cache.

This will determine the number linked lists used in the cache structure. For details see description of multiple linked lists in LruCacheBase.

Parameters
concurrencythe expected number of concurrent requests to the cache.
Returns
this builder

◆ setUpdateExisting()

Builder fiftyone.caching.LruPutCache< K, V >.Builder.setUpdateExisting ( boolean update)

Set whether or not an existing item in the cache should be updated with the value given to the put method.

By default this is false, meaning that if put is called for a key which already exists in the cache, the existing value is kept and there is no result to the put method

Parameters
updatetrue if existing items should be updated by the put method
Returns
this builder

Implements fiftyone.caching.PutCacheBuilder.