Example usage for org.apache.commons.collections.map LinkedMap asList

List of usage examples for org.apache.commons.collections.map LinkedMap asList

Introduction

In this page you can find the example usage for org.apache.commons.collections.map LinkedMap asList.

Prototype

public List asList() 

Source Link

Document

Gets an unmodifiable List view of the keys.

Usage

From source file:org.lockss.app.LockssDaemon.java

/** Stop the managers for the AU in the reverse order in which they
 * appear in the map *//*from   w ww .  j a  v a 2  s  . c o  m*/
public void stopAuManagers(ArchivalUnit au) {
    LinkedMap auMgrMap = (LinkedMap) auManagerMaps.get(au);
    if (auMgrMap != null) {
        @SuppressWarnings("unchecked")
        List<String> rkeys = ListUtil.reverseCopy(auMgrMap.asList());
        for (String key : rkeys) {
            LockssAuManager mgr = (LockssAuManager) auMgrMap.get(key);
            try {
                mgr.stopService();
            } catch (Exception e) {
                log.warning("Couldn't stop au manager " + mgr, e);
                // continue to try to stop other managers
            }
        }
    }
    auManagerMaps.remove(au);
}