public final class LookupStatic<K,V extends Closeable> extends EPJLifeCycle implements Cache<K,V>
Modifier and Type | Field and Description |
---|---|
private ResourceBuilder<K,V> |
builder |
private java.util.Map<K,V> |
cache |
private static org.slf4j.Logger |
log |
private java.lang.String |
name
only used for logging
|
Constructor and Description |
---|
LookupStatic(ResourceBuilder<K,V> builder) |
Modifier and Type | Method and Description |
---|---|
private V |
bind(K key) |
protected void |
doStop() |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(K key) |
private java.lang.Object |
getSynchronizableKey(K key)
see http://stackoverflow.com/questions/133988/problem-with-synchronizing-on-string-objects
|
void |
lifeCycleStopped(org.eclipse.jetty.util.component.LifeCycle event) |
void |
setName(java.lang.String name)
Cache has a name info
|
lifeCycleFailure, lifeCycleStarted, lifeCycleStarting, lifeCycleStopping
addLifeCycleListener, doStart, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
private static final org.slf4j.Logger log
private final ResourceBuilder<K,V extends Closeable> builder
private java.lang.String name
@Inject public LookupStatic(ResourceBuilder<K,V> builder)
public void setName(java.lang.String name)
Cache
public void lifeCycleStopped(org.eclipse.jetty.util.component.LifeCycle event)
lifeCycleStopped
in interface org.eclipse.jetty.util.component.LifeCycle.Listener
lifeCycleStopped
in class EPJLifeCycle
private java.lang.Object getSynchronizableKey(K key)
key
- protected void doStop() throws java.lang.Exception
doStop
in class org.eclipse.jetty.util.component.AbstractLifeCycle
java.lang.Exception