public abstract class LazyThreadSafeProducer<T> extends Object implements Producer<T>
Modifier and Type | Field and Description |
---|---|
private com.google.common.cache.LoadingCache<Locale,T> |
cache |
private ReadWriteLock |
lock |
private T |
nullLocale |
Constructor and Description |
---|
LazyThreadSafeProducer() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
create(Locale language) |
T |
get()
Get default Producer result
|
T |
get(Locale language)
Get language specific Producer result
|
T |
get(String identification) |
protected void |
setRecreate() |
private final ReadWriteLock lock
private T nullLocale
protected void setRecreate()
public T get() throws ConfigurationException
Producer
get
in interface Producer<T>
ConfigurationException
public T get(Locale language) throws ConfigurationException
Producer
get
in interface Producer<T>
language
- The resulting languageConfigurationException
protected abstract T create(Locale language) throws ConfigurationException
ConfigurationException
Copyright © 2012-2015 52north.org. All Rights Reserved.