Examples of LRUCache


Examples of com.mysql.jdbc.util.LRUCache

        cachedMetaData.fullColumnNameToIndex = resultSet.fullColumnNameToIndex;

        cachedMetaData.metadata = resultSet.getMetaData();

        if (this.resultSetMetadataCache == null) {
          this.resultSetMetadataCache = new LRUCache(this.connection
              .getMetadataCacheSize());
        }

        this.resultSetMetadataCache.put(sql, cachedMetaData);
      } else {
View Full Code Here

Examples of com.mysql.jdbc.util.LRUCache

   
    protected PerConnectionLRU(Connection forConnection, int cacheMaxSize,
        int maxKeySize) {
      final int cacheSize = cacheMaxSize;
      cacheSqlLimit = maxKeySize;
      cache = new LRUCache(cacheSize);
      conn = forConnection;
    }
View Full Code Here

Examples of com.mysql.jdbc.util.LRUCache

       
        throw sqlEx;
      }
 
      if (getUseServerPreparedStmts()) {
        this.serverSideStatementCheckCache = new LRUCache(cacheSize);
       
        this.serverSideStatementCache = new LRUCache(cacheSize) {
 
          private static final long serialVersionUID = 7692318650375988114L;
 
          protected boolean removeEldestEntry(java.util.Map.Entry<Object, Object> eldest) {
            if (this.maxElements <= 1) {
View Full Code Here

Examples of com.mysql.jdbc.util.LRUCache

              + "properties at the same time",
          SQLError.SQL_STATE_INVALID_CONNECTION_ATTRIBUTE, getExceptionInterceptor());
    }
   
    if (getCacheCallableStatements()) {
      this.parsedCallableStatementCache = new LRUCache(
          getCallableStatementCacheSize());
    }
   
    if (getAllowMultiQueries()) {
      setCacheResultSetMetadata(false); // we don't handle this yet
    }
   
    if (getCacheResultSetMetadata()) {
      this.resultSetMetadataCache = new LRUCache(
          getMetadataCacheSize());
    }
  }
View Full Code Here

Examples of com.mysql.jdbc.util.LRUCache

  private void createPreparedStatementCaches() {
    int cacheSize = getPreparedStatementCacheSize();
   
    this.cachedPreparedStatementParams = new HashMap(cacheSize);
   
    this.serverSideStatementCheckCache = new LRUCache(cacheSize);
   
    this.serverSideStatementCache = new LRUCache(cacheSize) {
      protected boolean removeEldestEntry(java.util.Map.Entry eldest) {
        if (this.maxElements <= 1) {
          return false;
        }
       
View Full Code Here

Examples of com.mysql.jdbc.util.LRUCache

      if (!getCacheCallableStatements()) {

        cStmt = parseCallableStatement(sql);
      } else {
        if (this.parsedCallableStatementCache == null) {
          this.parsedCallableStatementCache = new LRUCache(
              getCallableStatementCacheSize());
        }

        CompoundCacheKey key = new CompoundCacheKey(getCatalog(), sql);
View Full Code Here

Examples of com.opensymphony.oscache.base.algorithm.LRUCache

        caches     = new Cache[]
        {
            new MapCache(new HashMap(KEY_COUNT)),                                     //
            new MapCache(new Hashtable(KEY_COUNT)),                                   //
            new MapCache(new FIFOCache(KEY_COUNT)),                                   //
            new MapCache(new LRUCache(KEY_COUNT)),                                    //
            new SwarmCache(KEY_COUNT),                                                //
            new JcsCache(),                                                           //
            new EHCacheCache("test"),                                                 //
            new ZeroCacheFactory().newInstance("zero", TIMEOUT_MS, KEY_COUNT),        //
            new SingleCacheFactory().newInstance("single", TIMEOUT_MS, KEY_COUNT),    //
View Full Code Here

Examples of com.opensymphony.oscache.base.algorithm.LRUCache

        }

        if (cacheMap == null) {
            // If we have a capacity, use LRU cache otherwise use unlimited Cache
            if (capacity > 0) {
                cacheMap = new LRUCache(capacity);
            } else {
                cacheMap = new UnlimitedCache();
            }
        }
View Full Code Here

Examples of com.sun.appserv.util.cache.LruCache

            readyStore = new BaseCache();
            cacheSize = DEFAULT_CACHE_SIZE;
            readyStore.init(cacheSize, loadFactor, null);
        } else {
            cacheSize = (cacheSize <= 0) ? DEFAULT_CACHE_SIZE : cacheSize;
            LruCache lru = new LruCache(DEFAULT_CACHE_SIZE);
            if (numberOfVictimsToSelect >= 0) {
                loadFactor = (float) (1.0 - (1.0 *
                                             numberOfVictimsToSelect/cacheSize));
            }
            lru.init(cacheSize, idleTimeout, loadFactor, null);
            readyStore = lru;
            readyStore.addCacheListener(this);
        }
       
        if (idleTimeout > 0) {
View Full Code Here

Examples of com.sun.appserv.util.cache.LruCache

                                    new Integer(maxEntries),
                                    new Long(timeout),
                                    new Float(loadFactor)}));
            }

            LruCache c = new LruCache();
            c.init(maxEntries, timeout, loadFactor, (Properties) null);
            c.addCacheListener(
                    new CacheListener() {
                        public void trimEvent(Object key, Object value) {
                            cache.remove(key);
                            if (logger.isLoggable(Logger.FINER)) {
                                logger.finer(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.