com.mysql.cj

## Class PerConnectionLRUFactory.PerConnectionLRU

- java.lang.Object
- - com.mysql.cj.PerConnectionLRUFactory.PerConnectionLRU

All Implemented Interfaces:
  CacheAdapter<String,QueryInfo>

Enclosing class:
  PerConnectionLRUFactory

    class PerConnectionLRUFactory.PerConnectionLRU
    extends Object
    implements CacheAdapter<String,QueryInfo>

### Field Summary

Fields
`private LRUCache<String,QueryInfo>` `cache`
`private int` `cacheSqlLimit`
`private Object` `syncMutex`

### Constructor Summary

Constructors
`protected` `PerConnectionLRU(Object syncMutex, int cacheMaxSize, int maxKeySize)`

### Method Summary

All Methods Instance Methods Concrete Methods
`QueryInfo` `get(String key)`
`void` `invalidate(String key)`
`void` `invalidateAll()`
`void` `invalidateAll(Set<String> keys)`
`void` `put(String key, QueryInfo value)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### cacheSqlLimit

    private final int cacheSqlLimit

#### cache

    private final LRUCache<String,QueryInfo> cache

#### syncMutex

    private final Object syncMutex

### Constructor Detail

#### PerConnectionLRU

    protected PerConnectionLRU(Object syncMutex,
                               int cacheMaxSize,
                               int maxKeySize)

### Method Detail

#### get

    public QueryInfo get(String key)

Specified by:
  `get` in interface `CacheAdapter<String,QueryInfo>`

#### put

    public void put(String key,
                    QueryInfo value)

Specified by:
  `put` in interface `CacheAdapter<String,QueryInfo>`

#### invalidate

    public void invalidate(String key)

Specified by:
  `invalidate` in interface `CacheAdapter<String,QueryInfo>`

#### invalidateAll

    public void invalidateAll(Set<String> keys)

Specified by:
  `invalidateAll` in interface `CacheAdapter<String,QueryInfo>`

#### invalidateAll

    public void invalidateAll()

Specified by:
  `invalidateAll` in interface `CacheAdapter<String,QueryInfo>`

Copyright © 2016, 2023, Oracle and/or its affiliates.