Top Description Fields Constructors Methods
com.openhtmltopdf.extend.impl

public Class FSDefaultCacheStore

extends Object
implements FSCacheEx<String, FSCacheValue>
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.extend.FSCacheEx
Imports
java.util.Map, java.util.concurrent.Callable, .ConcurrentHashMap, java.util.logging.Level, com.openhtmltopdf.extend.FSCacheEx, .FSCacheValue, com.openhtmltopdf.util.LogMessageId, .XRLog

A simple default cache implementation, mainly for testing. For production you will probably want to wrap Guava's cache implementation or something similar. This implementation does not use synchronisation beyond using a ConcurrentHashMap internally. Specifically, the get(String, Callable) may call the loader multiple times if called in close succession.

Field Summary

Modifier and TypeField and Description
private final Map<String, FSCacheValue>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FSCacheValue
public FSCacheValue
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_storeback to summary
private final Map<String, FSCacheValue> _store

Constructor Detail

FSDefaultCacheStoreback to summary
public FSDefaultCacheStore()

Method Detail

getback to summary
public FSCacheValue get(String key, Callable<? extends FSCacheValue> loader)

Implements com.openhtmltopdf.extend.FSCacheEx.get.

Annotations
@Override
getback to summary
public FSCacheValue get(String key)

Implements com.openhtmltopdf.extend.FSCacheEx.get.

Annotations
@Override
putback to summary
public void put(String key, FSCacheValue value)

Implements com.openhtmltopdf.extend.FSCacheEx.put.

Annotations
@Override