Example usage for org.apache.solr.util ConcurrentLRUCache ConcurrentLRUCache

List of usage examples for org.apache.solr.util ConcurrentLRUCache ConcurrentLRUCache

Introduction

In this page you can find the example usage for org.apache.solr.util ConcurrentLRUCache ConcurrentLRUCache.

Prototype

public ConcurrentLRUCache(int size, int lowerWatermark) 

Source Link

Usage

From source file:com.teaspoonconsulting.solracls.SolrACLQueryComponent.java

License:Apache License

@Override
public void init(NamedList args) {
    super.init(args);

    principalsParameter = (String) args.get("principalsParameter");
    principalsField = (String) args.get("principalsField");

    if (principalsParameter == null || principalsParameter == null) {
        throw new RuntimeException("Both 'principalsParameter' and 'principalsField' must be set!");
    }/*from ww w.  ja v a  2 s  .co  m*/

    filterCache = new ConcurrentLRUCache<String, Query>((Integer) args.get("maxCacheEntries"),
            (Integer) args.get("cacheLowWaterMark"));
}

From source file:org.sakaiproject.nakamura.solr.NakamuraQueryComponent.java

License:Apache License

public NakamuraQueryComponent() {
    filterCache = new ConcurrentLRUCache<String, Query>(16384, 512);
}