mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 03:57:51 +02:00
Fix compilation errors caused by Caffeine changes (#1623)
This commit is contained in:
parent
adfae285df
commit
20c3e731fd
3 changed files with 6 additions and 6 deletions
|
@ -394,7 +394,7 @@ public abstract class EppResource extends BackupGroupRoot implements Buildable {
|
|||
|
||||
@Override
|
||||
public Map<VKey<? extends EppResource>, EppResource> loadAll(
|
||||
Set<? extends VKey<? extends EppResource>> keys) {
|
||||
Iterable<? extends VKey<? extends EppResource>> keys) {
|
||||
return replicaTm().doTransactionless(() -> replicaTm().loadByKeys(keys));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -35,6 +35,7 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Multimaps;
|
||||
import com.google.common.collect.Streams;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.annotation.Entity;
|
||||
import com.googlecode.objectify.annotation.Id;
|
||||
|
@ -58,7 +59,6 @@ import java.util.Collection;
|
|||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
|
@ -272,14 +272,14 @@ public abstract class ForeignKeyIndex<E extends EppResource> extends BackupGroup
|
|||
|
||||
@Override
|
||||
public Map<VKey<ForeignKeyIndex<?>>, Optional<ForeignKeyIndex<?>>> loadAll(
|
||||
Set<? extends VKey<ForeignKeyIndex<?>>> keys) {
|
||||
if (keys.isEmpty()) {
|
||||
Iterable<? extends VKey<ForeignKeyIndex<?>>> keys) {
|
||||
if (!keys.iterator().hasNext()) {
|
||||
return ImmutableMap.of();
|
||||
}
|
||||
Class<? extends EppResource> resourceClass =
|
||||
RESOURCE_CLASS_TO_FKI_CLASS.inverse().get(keys.iterator().next().getKind());
|
||||
ImmutableSet<String> foreignKeys =
|
||||
keys.stream().map(v -> v.getSqlKey().toString()).collect(toImmutableSet());
|
||||
Streams.stream(keys).map(v -> v.getSqlKey().toString()).collect(toImmutableSet());
|
||||
ImmutableSet<VKey<ForeignKeyIndex<?>>> typedKeys = ImmutableSet.copyOf(keys);
|
||||
ImmutableMap<String, ? extends ForeignKeyIndex<? extends EppResource>> existingFkis =
|
||||
loadIndexesFromStore(resourceClass, foreignKeys, false, true);
|
||||
|
|
|
@ -277,7 +277,7 @@ public class Registry extends ImmutableObject
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Optional<Registry>> loadAll(Set<? extends String> tlds) {
|
||||
public Map<String, Optional<Registry>> loadAll(Iterable<? extends String> tlds) {
|
||||
ImmutableMap<String, VKey<Registry>> keysMap =
|
||||
toMap(ImmutableSet.copyOf(tlds), Registry::createVKey);
|
||||
Map<VKey<? extends Registry>, Registry> entities =
|
||||
|
|
Loading…
Add table
Reference in a new issue