- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for LRU (0.01 sec)
-
internal/stmt_store/stmt_store.go
lru *lru.LRU[string, *Stmt] } func (s *lruStore) Keys() []string { return s.lru.Keys() } func (s *lruStore) Get(key string) (*Stmt, bool) { stmt, ok := s.lru.Get(key) if ok && stmt != nil { <-stmt.prepared } return stmt, ok } func (s *lruStore) Set(key string, value *Stmt) { s.lru.Add(key, value) } func (s *lruStore) Delete(key string) { s.lru.Remove(key) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun Apr 27 06:05:16 UTC 2025 - 6K bytes - Viewed (0) -
src/test/java/org/codelibs/core/collection/LruHashMapTest.java
*/ @Test public void testAll() throws Exception { final LruHashMap<String, String> lru = new LruHashMap<String, String>(3); lru.put("aaa", "111"); lru.put("bbb", "222"); lru.put("ccc", "333"); assertThat(lru.get("aaa"), is("111")); Iterator<String> i = lru.keySet().iterator(); assertThat(i.next(), is("bbb")); assertThat(i.next(), is("ccc"));
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/prepared_stmt_test.go
lens := len(conn.Stmts.Keys()) // Check if the number of stored statement keys is 0. if lens == 0 { // If the number is 0, it means there are no statements stored in the LRU cache. // The test fails and an error message is output. t.Fatalf("lru should not be empty") } // Wait for 40 seconds to give the statements in the cache enough time to expire. time.Sleep(time.Second * 40)
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Apr 25 08:22:26 UTC 2025 - 8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/collection/LruHashMap.java
import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; /** * {@link HashMap} with an upper limit on the number of entries. When a new entry is added, the oldest entry is discarded using LRU if the limit is exceeded. * * @author koichik * @param <K> the key type * @param <V> the value type */ public class LruHashMap<K, V> extends LinkedHashMap<K, V> {
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jun 19 09:12:22 UTC 2025 - 2.3K bytes - Viewed (0) -
src/main/java/org/codelibs/core/collection/LruHashSet.java
*/ public class LruHashSet<E> extends AbstractSet<E> implements Set<E>, java.io.Serializable { private static final long serialVersionUID = 1L; /** * The internal LRU hash map used to store elements. */ private final LruHashMap<E, Object> map; // Dummy value to associate with an Object in the backing Map private static final Object PRESENT = new Object(); /**
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Sat Jul 05 00:11:05 UTC 2025 - 3.7K bytes - Viewed (0)