Search in sources :

Example 1 with NodeContent

use of com.microsoft.azuretools.core.mvp.ui.base.NodeContent in project azure-tools-for-java by Microsoft.

the class RedisCacheModulePresenter method onModuleRefresh.

/**
 * Called from view when the view needs refresh.
 */
public void onModuleRefresh() {
    final HashMap<String, ArrayList<NodeContent>> nodeMap = new HashMap<>();
    final HashMap<String, RedisCaches> redisCachesMap = azureRedisMvpModel.getRedisCaches();
    for (final String sid : redisCachesMap.keySet()) {
        final ArrayList<NodeContent> nodeContentList = new ArrayList<>();
        for (final RedisCache redisCache : redisCachesMap.get(sid).list()) {
            nodeContentList.add(new NodeContent(redisCache.id(), redisCache.name(), redisCache.provisioningState()));
        }
        nodeMap.put(sid, nodeContentList);
    }
    getMvpView().showNode(nodeMap);
}
Also used : RedisCache(com.microsoft.azure.management.redis.RedisCache) RedisCaches(com.microsoft.azure.management.redis.RedisCaches) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) NodeContent(com.microsoft.azuretools.core.mvp.ui.base.NodeContent)

Aggregations

RedisCache (com.microsoft.azure.management.redis.RedisCache)1 RedisCaches (com.microsoft.azure.management.redis.RedisCaches)1 NodeContent (com.microsoft.azuretools.core.mvp.ui.base.NodeContent)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1