Search in sources :

Example 1 with DynamicReference

use of io.fabric8.api.DynamicReference in project fabric8 by jboss-fuse.

the class ComputeRegistryImpl method list.

@Override
public List<ComputeService> list() {
    assertValid();
    List<ComputeService> list = new ArrayList<ComputeService>();
    for (Map.Entry<String, DynamicReference<ComputeService>> entry : computeServices.entrySet()) {
        ComputeService computeService = entry.getValue().getIfPresent();
        if (computeService != null) {
            list.add(computeService);
        }
    }
    return list;
}
Also used : DynamicReference(io.fabric8.api.DynamicReference) ArrayList(java.util.ArrayList) ComputeService(org.jclouds.compute.ComputeService) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap) Map(java.util.Map)

Aggregations

DynamicReference (io.fabric8.api.DynamicReference)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ConcurrentMap (java.util.concurrent.ConcurrentMap)1 ComputeService (org.jclouds.compute.ComputeService)1