mirror of https://github.com/apache/jclouds.git
updated to guava 11 cache miss behavior
This commit is contained in:
parent
617d267360
commit
a80e1b07e6
|
@ -58,6 +58,7 @@ import org.jclouds.logging.Logger;
|
|||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -169,7 +170,7 @@ public class CloudSigmaComputeServiceAdapter implements
|
|||
public Future<DriveInfo> apply(String input) {
|
||||
try {
|
||||
return Futures.immediateFuture(cache.getUnchecked(input));
|
||||
} catch (NullPointerException e) {
|
||||
} catch (CacheLoader.InvalidCacheLoadException e) {
|
||||
logger.debug("drive %s not found", input);
|
||||
} catch (UncheckedExecutionException e) {
|
||||
logger.warn(e, "error finding drive %s: %s", input, e.getMessage());
|
||||
|
|
|
@ -61,6 +61,7 @@ import org.jclouds.logging.Logger;
|
|||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -169,7 +170,7 @@ public class ElasticStackComputeServiceAdapter implements
|
|||
public Future<DriveInfo> apply(String input) {
|
||||
try {
|
||||
return Futures.immediateFuture(cache.getUnchecked(input));
|
||||
} catch (NullPointerException e) {
|
||||
} catch (CacheLoader.InvalidCacheLoadException e) {
|
||||
logger.debug("drive %s not found", input);
|
||||
} catch (UncheckedExecutionException e) {
|
||||
logger.warn(e, "error finding drive %s: %s", input, e.getMessage());
|
||||
|
|
Loading…
Reference in New Issue