org.elasticsearch.common.inject.internal
Class FailableCache<K,V>

java.lang.Object
  extended by org.elasticsearch.common.inject.internal.FailableCache<K,V>

public abstract class FailableCache<K,V>
extends Object

Lazily creates (and caches) values for keys. If creating the value fails (with errors), an exception is thrown on retrieval.

Author:
jessewilson@google.com (Jesse Wilson)

Constructor Summary
FailableCache()
           
 
Method Summary
protected abstract  V create(K key, Errors errors)
           
 V get(K key, Errors errors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailableCache

public FailableCache()
Method Detail

create

protected abstract V create(K key,
                            Errors errors)
                     throws ErrorsException
Throws:
ErrorsException

get

public V get(K key,
             Errors errors)
      throws ErrorsException
Throws:
ErrorsException


Copyright © 2009-2012. All Rights Reserved.