ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/dbcp/pool2/impl/EvictionPolicy.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/dbcp/pool2/impl/EvictionPolicy.java
Status
scanned
Type
file
Name
EvictionPolicy.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
1821 (1.8 KB)
MD5
50ce01510281b8fffac3a9b673e451fb
SHA1
fa39cdbcf5d58421bc8b48bf1667c7e53be157d4
SHA256
d1f6a17c8a885f8223055a4f53a894921989ccd3fe3b7eee12e939264c9f2760
SHA512

      
    
SHA1_git
327075d69932a63ecc7daa7588be4592dffbf3e1
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
EvictionPolicy.java | 1.8 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.dbcp.pool2.impl; import org.apache.tomcat.dbcp.pool2.PooledObject; /** * To provide a custom eviction policy (i.e. something other than {@link * DefaultEvictionPolicy} for a pool, users must provide an implementation of * this interface that provides the required eviction policy. * * @param <T> the type of objects in the pool. * @since 2.0 */ public interface EvictionPolicy<T> { /** * Tests if an idle object in the pool should be evicted or not. * * @param config The pool configuration settings related to eviction * @param underTest The pooled object being tested for eviction * @param idleCount The current number of idle objects in the pool including * the object under test * @return {@code true} if the object should be evicted, otherwise * {@code false} */ boolean evict(EvictionConfig config, PooledObject<T> underTest, int idleCount); }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
48.57
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-eb6b5ae0-4f88-4e9b-d67c-c6c8e733b1cd apache-2.0 Apache-2.0
URL Start line End line
https://www.apache.org/licenses/LICENSE-2.0 9 9