\r\n

51Degrees Pipeline Java  4.4

51Degrees Pipeline for Java

fiftyone.caching.PutCacheBuilder Interface Reference

Inheritance diagram for fiftyone.caching.PutCacheBuilder:

[legend]

Collaboration diagram for fiftyone.caching.PutCacheBuilder:

[legend]

Public Member Functions

PutCacheBuilder  setUpdateExisting (boolean update)
Set whether or not an existing item in the cache should be updated with the value given to the put method. More...
< K, V > PutCache< K, V >  build (Cache< K, V > c, int cacheSize)
Build a new instance of the cache. More...

Member Function Documentation

◆ build()

<K, V> PutCache<K, V> fiftyone.caching.PutCacheBuilder.build ( Cache< K, V >   c,
int   cacheSize  
)

Build a new instance of the cache.

Parameters
c - a cache to get the key and value types from
cacheSize - size of the cache
<K> - type of key to store in the cache
<V> - type of value to store in the cache
Returns
a new cache instance

Implements fiftyone.caching.CacheBuilder.

◆ setUpdateExisting()

PutCacheBuilder fiftyone.caching.PutCacheBuilder.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
update - true if existing items should be updated by the put method
Returns
this builder

Implemented in fiftyone.caching.LruPutCache< K, V >.Builder.