Java 类org.apache.commons.collections.map.ReferenceMap 实例源码

项目:jasperreports    文件:StoreFactoryVirtualizer.java   
public StoreFactoryVirtualizer(int maxSize, VirtualizerStoreFactory storeFactory)
{
    super(maxSize);

    this.storeFactory = storeFactory;

    this.contextStores = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.HARD);
}
项目:jasperreports    文件:JRAbstractLRUVirtualizer.java   
/**
 * @param maxSize
 *            the maximum size (in JRVirtualizable objects) of the paged in
 *            cache.
 */
protected JRAbstractLRUVirtualizer(int maxSize)
{
    this.pagedIn = new Cache(maxSize);
    this.pagedOut = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK);
    this.lastObjectRef = null;

    this.lastObjectMap = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.WEAK);
    this.lastObjectSet = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.HARD);
}
项目:incubator-taverna-server    文件:DirectoryDelegate.java   
/**
 * @param dir
 * @param parent
 * @throws RemoteException
 *             If registration of the directory fails.
 */
public DirectoryDelegate(@Nonnull File dir,
        @Nonnull DirectoryDelegate parent) throws RemoteException {
    super();
    this.localCache = new ReferenceMap();
    this.dir = dir;
    this.parent = parent;
}
项目:James    文件:MailRepositoryStoreBeanFactory.java   
@PostConstruct
@SuppressWarnings("unchecked")
public void init() throws Exception {

    getLogger().info("JamesMailStore init...");

    repositories = new ReferenceMap();
    classes = new HashMap<String, String>();
    defaultConfigs = new HashMap<String, HierarchicalConfiguration>();
    List<HierarchicalConfiguration> registeredClasses = configuration.configurationsAt("mailrepositories.mailrepository");
    for (int i = 0; i < registeredClasses.size(); i++) {
        registerRepository(registeredClasses.get(i));
    }

}
项目:jasperreports    文件:TemplateSaxParserFactory.java   
@Override
protected ThreadLocal<ReferenceMap> getGrammarPoolCache()
{
    return GRAMMAR_POOL_CACHE;
}
项目:jasperreports    文件:JRReportSaxParserFactory.java   
@Override
protected ThreadLocal<ReferenceMap> getGrammarPoolCache()
{
    return GRAMMAR_POOL_CACHE;
}
项目:jasperreports    文件:XmlValueHandlerUtils.java   
private XmlValueHandlerUtils()
{
    cache = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.HARD);
}
项目:jasperreports    文件:PrintSaxParserFactory.java   
@Override
protected ThreadLocal<ReferenceMap> getGrammarPoolCache()
{
    return GRAMMAR_POOL_CACHE;
}
项目:jasperreports    文件:JRSingletonCache.java   
/**
 * Creates a cache of singleton instances.
 * 
 * @param itf a interface or class that should be implemented by all classes cached by this object
 */
public JRSingletonCache(Class<T> itf)
{
    cache = new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.SOFT);
    this.itf = itf;
}
项目:jasperreports    文件:JRFillCellContents.java   
public JRFillCellContents(JRBaseFiller filler, JRCellContents cell, String cellType, 
        JRFillCrosstabObjectFactory factory)
{
    super(filler, cell, factory);

    defaultStyleProvider = factory.getDefaultStyleProvider();

    parentCell = cell;
    this.cellType = cellType;


    int elementId = filler.getFillContext().generateFillElementId();
    printElementOriginator = new DefaultPrintElementOriginator(elementId);

    lineBox = cell.getLineBox().clone(this);

    width = cell.getWidth();
    height = cell.getHeight();

    factory.registerDelayedStyleSetter(this, parentCell);

    initElements();

    initConditionalStyles();

    initTemplatesMap();

    this.originProvider = factory.getParentOriginProvider();
    setElementOriginProvider(this.originProvider);

    transformedContentsCache = new ReferenceMap();
    boxContentsCache = new HashMap<BoxContents,JRFillCellContents>();
    clonePool = new JRClonePool(this, true, true);
}
项目:jasperreports    文件:JRFillCellContents.java   
protected JRFillCellContents(JRFillCellContents cellContents, JRFillCloneFactory factory)
{
    super(cellContents, factory);

    defaultStyleProvider = cellContents.defaultStyleProvider;

    parentCell = cellContents.parentCell;
    cellType = cellContents.cellType;
    printElementOriginator = cellContents.printElementOriginator;

    lineBox = cellContents.getLineBox().clone(this);

    width = cellContents.width;
    height = cellContents.height;

    initStyle = cellContents.initStyle;

    initElements();

    initConditionalStyles();

    this.templateFrames = cellContents.templateFrames;

    this.originProvider = cellContents.originProvider;

    transformedContentsCache = new ReferenceMap();
    boxContentsCache = new HashMap<BoxContents,JRFillCellContents>();
    clonePool = new JRClonePool(this, true, true);

    verticalPositionType = cellContents.verticalPositionType;
}
项目:Lucee4    文件:StructImpl.java   
/**
 * This implementation spares its clients from the unspecified, 
 * generally chaotic ordering provided by normally Struct , 
 * without incurring the increased cost associated with TreeMap. 
 * It can be used to produce a copy of a map that has the same order as the original
 * @param type
 * @param initialCapacity initial capacity - MUST be a power of two.
 */
public StructImpl(int type, int initialCapacity) {
    if(type==TYPE_WEAKED)   map=new SyncMap<Collection.Key, Object>(new WeakHashMapPro<Collection.Key,Object>(initialCapacity));
    else if(type==TYPE_SOFT)    map=new SyncMap<Collection.Key, Object>(new MapProWrapper<Collection.Key, Object>(new ReferenceMap(ReferenceMap.HARD,ReferenceMap.SOFT,initialCapacity,0.75f),new SerializableObject()));
    else if(type==TYPE_LINKED)      map=new SyncMap<Collection.Key, Object>(new LinkedHashMapPro<Collection.Key,Object>(initialCapacity));
    else                        map=MapFactory.getConcurrentMap(initialCapacity);
}
项目:jasperreports    文件:BaseSaxParserFactory.java   
protected abstract ThreadLocal<ReferenceMap> getGrammarPoolCache();