# Class LruTraceCache

java.lang.Object
java.util.AbstractMap<String, TraceObject>
java.util.HashMap<String, TraceObject>
java.util.LinkedHashMap<String, TraceObject>
org.mariadb.jdbc.internal.io.LruTraceCache

All Implemented Interfaces:
  `Serializable, Cloneable, Map<String, TraceObject>, SequencedMap<String, TraceObject>`

public class LruTraceCache extends LinkedHashMap<String, TraceObject>

See Also:
  - Serialized Form

## Nested Class Summary

### Nested classes/interfaces inherited from class AbstractMap

`AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

## Constructor Summary

Constructors
Constructor
Description
`LruTraceCache()`

## Method Summary

Modifier and Type
Method
Description
`void`
`clearMemory()`
Permit to clear array's of array, to help garbage.
`String`
`printStack()`
Value of trace cache in a readable format.
`TraceObject`
`put(TraceObject value)`
Add value to map.
`protected boolean`
`removeEldestEntry(Map.Entry<String, TraceObject> eldest)`

### Methods inherited from class LinkedHashMap

`clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values`

### Methods inherited from class HashMap

`clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

### Methods inherited from class AbstractMap

`equals, hashCode, toString`

### Methods inherited from class Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface Map

`compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

### Methods inherited from interface SequencedMap

`firstEntry, lastEntry, pollFirstEntry, pollLastEntry`

## Constructor Details

### LruTraceCache

public LruTraceCache()

## Method Details

### put

public TraceObject put(TraceObject value)
Add value to map.

Parameters:
  `value` - value to add
Returns:
  added value

### removeEldestEntry

protected boolean removeEldestEntry(Map.Entry<String, TraceObject> eldest)

Overrides:
  `removeEldestEntry` in class `LinkedHashMap<String, TraceObject>`

### printStack

public String printStack()
Value of trace cache in a readable format.

Returns:
  trace cache value

### clearMemory

public void clearMemory()
Permit to clear array's of array, to help garbage.