Example usage for org.apache.commons.collections4.map LRUMap putAll

List of usage examples for org.apache.commons.collections4.map LRUMap putAll

Introduction

In this page you can find the example usage for org.apache.commons.collections4.map LRUMap putAll.

Prototype

void putAll(Map<? extends K, ? extends V> m);

Source Link

Document

Copies all of the mappings from the specified map to this map (optional operation).

Usage

From source file:org.orbisgis.corejdbc.internal.ReadRowSetImpl.java

@Override
public void setFetchSize(int i) throws SQLException {
    fetchSize = i;/*  w  w w  .  j  a v a2 s. co  m*/
    LRUMap<Long, Row> lruMap = new LRUMap<>(fetchSize + 1);
    lruMap.putAll(cache);
    cache = lruMap;
    rowFetchFirstPk = new ArrayList<>(Arrays.asList(new Long[] { null }));
    currentBatch.clear();
    currentBatchId = -1;
}