Code example for MapMaker

Methods: makeMap

0
import java.util.UUID;
import java.util.concurrent.ConcurrentMap;
 
public class InMemoryInstanceConnector implements InstanceConnector 
{ 
    private final ConcurrentMap<String, Instance> instanceMap = new MapMaker().makeMap();
    private static final Set<Size> SIZE_SET = ImmutableSet.of(
            new Size("m1.tiny", 1, new DataSize(512, Unit.MEGABYTE), new DataSize(10, Unit.GIGABYTE)), 
            new Size("m1.small", 1, new DataSize(1, Unit.GIGABYTE), new DataSize(100, Unit.GIGABYTE)), 
            new Size("c1.small", 1, new DataSize(1, Unit.GIGABYTE), new DataSize(30, Unit.GIGABYTE)), 
            new Size("m1.medium", 2, new DataSize(2, Unit.GIGABYTE), new DataSize(200, Unit.GIGABYTE))); 
 
    @Override 
    public Iterable<Instance> getAllInstances()
    { 
        return instanceMap.values();
    } 
 
    @Override 
    public Instance getInstance(String instanceId)