Example usage for org.apache.commons.collections ReferenceMap ReferenceMap

List of usage examples for org.apache.commons.collections ReferenceMap ReferenceMap

Introduction

In this page you can find the example usage for org.apache.commons.collections ReferenceMap ReferenceMap.

Prototype

public ReferenceMap() 

Source Link

Document

Constructs a new ReferenceMap that will use hard references to keys and soft references to values.

Usage

From source file:org.apache.james.core.AvalonMailStore.java

/**
 * @see org.apache.avalon.framework.activity.Initializable#initialize()
 *///w w w. ja  va  2 s.  co  m
public void initialize() throws Exception {

    getLogger().info("JamesMailStore init...");
    repositories = new ReferenceMap();
    classes = new HashMap();
    defaultConfigs = new HashMap();
    Configuration[] registeredClasses = configuration.getChild("repositories").getChildren("repository");
    for (int i = 0; i < registeredClasses.length; i++) {
        registerRepository(registeredClasses[i]);
    }

}

From source file:org.apache.james.James.java

/**
 * Think about it as a store, where you can access to services that have been
 * added to configuration file. compMgr is used only in initialize() and to
 * retrieve DNS service in some methods. We need to remove this crap, and
 * thus need to/*  w w w .j  a  v  a  2s. com*/
 *
 *
 * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
 */
public void service(ServiceManager comp) {
    compMgr = new DefaultServiceManager(comp);
    mailboxes = new ReferenceMap();
}

From source file:org.apache.openjpa.lib.rop.SoftRandomAccessResultList.java

protected Map newRowMap() {
    return new ReferenceMap();
}

From source file:org.sakaiproject.tool.assessment.qti.util.XmlStringBuffer.java

/**
 * internal/*from w w w.  j av  a 2 s  .  c om*/
 *
 * @return  reference map
 */
private ReferenceMap getCache() {
    if (this.cache == null) {
        this.cache = new ReferenceMap();
    }

    return this.cache;
}

From source file:org.sakaiproject.tool.assessment.qti.util.XmlStringBuffer.java

/**
 * inernal, clear cache/* w  w  w .j a  va 2s.  c  o  m*/
 */
private void clearCache() {
    if (this.cache == null) {
        this.cache = new ReferenceMap();
    } else {
        this.cache.clear();
    }
}