ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/util/Cache.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/util/Cache.java
Status
scanned
Type
file
Name
Cache.java
Extension
.java
Programming language
Java
Mime type
text/x-java
File type
Java source, ASCII text
Tag

      
    
Rootfs path

      
    
Size
2142 (2.1 KB)
MD5
f09b4ca81d7dba4b7fc211c4c34484ef
SHA1
536532fe398e79a562ae6b246184277fa991774a
SHA256
7475ffe8420697c0a010d6d262b53c5710acd70c6c983b43fec3567da62594b6
SHA512

      
    
SHA1_git
5d5002a28730f77a084309b08e5c85f2e54b9c51
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
Cache.java | 2.1 KB |

/* * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (https://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.util; import java.util.ArrayList; /** * The cache keeps frequently used objects in the main memory. */ public interface Cache { /** * Get all objects in the cache that have been changed. * * @return the list of objects */ ArrayList<CacheObject> getAllChanged(); /** * Clear the cache. */ void clear(); /** * Get an element in the cache if it is available. * This will move the item to the front of the list. * * @param pos the unique key of the element * @return the element or null */ CacheObject get(int pos); /** * Add an element to the cache. Other items may fall out of the cache * because of this. It is not allowed to add the same record twice. * * @param r the object */ void put(CacheObject r); /** * Update an element in the cache. * This will move the item to the front of the list. * * @param pos the unique key of the element * @param record the element * @return the element */ CacheObject update(int pos, CacheObject record); /** * Remove an object from the cache. * * @param pos the unique key of the element * @return true if the key was in the cache */ boolean remove(int pos); /** * Get an element from the cache if it is available. * This will not move the item to the front of the list. * * @param pos the unique key of the element * @return the element or null */ CacheObject find(int pos); /** * Set the maximum memory to be used by this cache. * * @param size the maximum size in KB */ void setMaxMemory(int size); /** * Get the maximum memory to be used. * * @return the maximum size in KB */ int getMaxMemory(); /** * Get the used size in KB. * * @return the current size in KB */ int getMemory(); }
Detected license expression
mpl-2.0 AND epl-1.0
Detected license expression (SPDX)
MPL-2.0 AND EPL-1.0
Percentage of license text
3.05
Copyrights
- end_line: 2
  copyright: Copyright 2004-2023 H2 Group. Multiple-Licensed
  start_line: 2
Holders
- holder: H2 Group. Multiple-Licensed
  end_line: 2
  start_line: 2
Authors

      
    
License detections License expression License expression SPDX
mpl_2_0_and_epl_1_0-796bf8d7-f485-3520-923d-e6a4b1ecd2f3 mpl-2.0 AND epl-1.0 MPL-2.0 AND EPL-1.0
URL Start line End line
https://h2database.com/html/license.html 3 3
Package URL License Primary language
pkg:osgi/com.h2database.source@2.2.220