All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.arbjerg.lavalink.internal.loadbalancing.LRUCache.kt Maven / Gradle / Ivy

package dev.arbjerg.lavalink.internal.loadbalancing

// 0.75 is the default load factor for LinkedHashMap
class LRUCache(private val limit: Int) : LinkedHashMap(limit, 0.75f, true) {
    override fun removeEldestEntry(eldest: MutableMap.MutableEntry?): Boolean {
        return size > limit
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy