commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1020166 [34/44] - in /websites/production/commons/content/proper/commons-pool: ./ api-2.4.3/ api-2.4.3/org/ api-2.4.3/org/apache/ api-2.4.3/org/apache/commons/ api-2.4.3/org/apache/commons/pool2/ api-2.4.3/org/apache/commons/pool2/class-us...
Date Sat, 28 Oct 2017 18:29:13 GMT
Added: websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultEvictionPolicy.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultEvictionPolicy.html (added)
+++ websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultEvictionPolicy.html Sat Oct 28 18:29:09 2017
@@ -0,0 +1,125 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.pool2.impl;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>import org.apache.commons.pool2.PooledObject;<a name="line.19"></a>
+<span class="sourceLineNo">020</span><a name="line.20"></a>
+<span class="sourceLineNo">021</span>/**<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * Provides the default implementation of {@link EvictionPolicy} used by the<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * pools. Objects will be evicted if the following conditions are met:<a name="line.23"></a>
+<span class="sourceLineNo">024</span> * &lt;ul&gt;<a name="line.24"></a>
+<span class="sourceLineNo">025</span> * &lt;li&gt;the object has been idle longer than<a name="line.25"></a>
+<span class="sourceLineNo">026</span> *     {@link GenericObjectPool#getMinEvictableIdleTimeMillis()} /<a name="line.26"></a>
+<span class="sourceLineNo">027</span> *     {@link GenericKeyedObjectPool#getMinEvictableIdleTimeMillis()}&lt;/li&gt;<a name="line.27"></a>
+<span class="sourceLineNo">028</span> * &lt;li&gt;there are more than {@link GenericObjectPool#getMinIdle()} /<a name="line.28"></a>
+<span class="sourceLineNo">029</span> *     {@link GenericKeyedObjectPoolConfig#getMinIdlePerKey()} idle objects in<a name="line.29"></a>
+<span class="sourceLineNo">030</span> *     the pool and the object has been idle for longer than<a name="line.30"></a>
+<span class="sourceLineNo">031</span> *     {@link GenericObjectPool#getSoftMinEvictableIdleTimeMillis()} /<a name="line.31"></a>
+<span class="sourceLineNo">032</span> *     {@link GenericKeyedObjectPool#getSoftMinEvictableIdleTimeMillis()}<a name="line.32"></a>
+<span class="sourceLineNo">033</span> * &lt;/ul&gt;<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * This class is immutable and thread-safe.<a name="line.34"></a>
+<span class="sourceLineNo">035</span> *<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * @param &lt;T&gt; the type of objects in the pool<a name="line.36"></a>
+<span class="sourceLineNo">037</span> *<a name="line.37"></a>
+<span class="sourceLineNo">038</span> * @since 2.0<a name="line.38"></a>
+<span class="sourceLineNo">039</span> */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>public class DefaultEvictionPolicy&lt;T&gt; implements EvictionPolicy&lt;T&gt; {<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>    @Override<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    public boolean evict(final EvictionConfig config, final PooledObject&lt;T&gt; underTest,<a name="line.43"></a>
+<span class="sourceLineNo">044</span>            final int idleCount) {<a name="line.44"></a>
+<span class="sourceLineNo">045</span><a name="line.45"></a>
+<span class="sourceLineNo">046</span>        if ((config.getIdleSoftEvictTime() &lt; underTest.getIdleTimeMillis() &amp;&amp;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>                config.getMinIdle() &lt; idleCount) ||<a name="line.47"></a>
+<span class="sourceLineNo">048</span>                config.getIdleEvictTime() &lt; underTest.getIdleTimeMillis()) {<a name="line.48"></a>
+<span class="sourceLineNo">049</span>            return true;<a name="line.49"></a>
+<span class="sourceLineNo">050</span>        }<a name="line.50"></a>
+<span class="sourceLineNo">051</span>        return false;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    }<a name="line.52"></a>
+<span class="sourceLineNo">053</span>}<a name="line.53"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

Added: websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObject.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObject.html (added)
+++ websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObject.html Sat Oct 28 18:29:09 2017
@@ -0,0 +1,351 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.pool2.impl;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>import org.apache.commons.pool2.PooledObject;<a name="line.19"></a>
+<span class="sourceLineNo">020</span>import org.apache.commons.pool2.PooledObjectState;<a name="line.20"></a>
+<span class="sourceLineNo">021</span>import org.apache.commons.pool2.TrackedUse;<a name="line.21"></a>
+<span class="sourceLineNo">022</span><a name="line.22"></a>
+<span class="sourceLineNo">023</span>import java.io.PrintWriter;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import java.util.Deque;<a name="line.24"></a>
+<span class="sourceLineNo">025</span><a name="line.25"></a>
+<span class="sourceLineNo">026</span>/**<a name="line.26"></a>
+<span class="sourceLineNo">027</span> * This wrapper is used to track the additional information, such as state, for<a name="line.27"></a>
+<span class="sourceLineNo">028</span> * the pooled objects.<a name="line.28"></a>
+<span class="sourceLineNo">029</span> * &lt;p&gt;<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * This class is intended to be thread-safe.<a name="line.30"></a>
+<span class="sourceLineNo">031</span> *<a name="line.31"></a>
+<span class="sourceLineNo">032</span> * @param &lt;T&gt; the type of object in the pool<a name="line.32"></a>
+<span class="sourceLineNo">033</span> *<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * @since 2.0<a name="line.34"></a>
+<span class="sourceLineNo">035</span> */<a name="line.35"></a>
+<span class="sourceLineNo">036</span>public class DefaultPooledObject&lt;T&gt; implements PooledObject&lt;T&gt; {<a name="line.36"></a>
+<span class="sourceLineNo">037</span><a name="line.37"></a>
+<span class="sourceLineNo">038</span>    private final T object;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    private PooledObjectState state = PooledObjectState.IDLE; // @GuardedBy("this") to ensure transitions are valid<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    private final long createTime = System.currentTimeMillis();<a name="line.40"></a>
+<span class="sourceLineNo">041</span>    private volatile long lastBorrowTime = createTime;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    private volatile long lastUseTime = createTime;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    private volatile long lastReturnTime = createTime;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>    private volatile boolean logAbandoned = false;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>    private final CallStack borrowedBy = CallStackUtils.newCallStack("'Pooled object created' " +<a name="line.45"></a>
+<span class="sourceLineNo">046</span>        "yyyy-MM-dd HH:mm:ss Z 'by the following code has not been returned to the pool:'", true);<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    private final CallStack usedBy = CallStackUtils.newCallStack("The last code to use this object was:",<a name="line.47"></a>
+<span class="sourceLineNo">048</span>        false);<a name="line.48"></a>
+<span class="sourceLineNo">049</span>    private volatile long borrowedCount = 0;<a name="line.49"></a>
+<span class="sourceLineNo">050</span><a name="line.50"></a>
+<span class="sourceLineNo">051</span>    /**<a name="line.51"></a>
+<span class="sourceLineNo">052</span>     * Create a new instance that wraps the provided object so that the pool can<a name="line.52"></a>
+<span class="sourceLineNo">053</span>     * track the state of the pooled object.<a name="line.53"></a>
+<span class="sourceLineNo">054</span>     *<a name="line.54"></a>
+<span class="sourceLineNo">055</span>     * @param object The object to wrap<a name="line.55"></a>
+<span class="sourceLineNo">056</span>     */<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    public DefaultPooledObject(final T object) {<a name="line.57"></a>
+<span class="sourceLineNo">058</span>        this.object = object;<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    }<a name="line.59"></a>
+<span class="sourceLineNo">060</span><a name="line.60"></a>
+<span class="sourceLineNo">061</span>    @Override<a name="line.61"></a>
+<span class="sourceLineNo">062</span>    public T getObject() {<a name="line.62"></a>
+<span class="sourceLineNo">063</span>        return object;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    }<a name="line.64"></a>
+<span class="sourceLineNo">065</span><a name="line.65"></a>
+<span class="sourceLineNo">066</span>    @Override<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    public long getCreateTime() {<a name="line.67"></a>
+<span class="sourceLineNo">068</span>        return createTime;<a name="line.68"></a>
+<span class="sourceLineNo">069</span>    }<a name="line.69"></a>
+<span class="sourceLineNo">070</span><a name="line.70"></a>
+<span class="sourceLineNo">071</span>    @Override<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    public long getActiveTimeMillis() {<a name="line.72"></a>
+<span class="sourceLineNo">073</span>        // Take copies to avoid threading issues<a name="line.73"></a>
+<span class="sourceLineNo">074</span>        final long rTime = lastReturnTime;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>        final long bTime = lastBorrowTime;<a name="line.75"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
+<span class="sourceLineNo">077</span>        if (rTime &gt; bTime) {<a name="line.77"></a>
+<span class="sourceLineNo">078</span>            return rTime - bTime;<a name="line.78"></a>
+<span class="sourceLineNo">079</span>        }<a name="line.79"></a>
+<span class="sourceLineNo">080</span>        return System.currentTimeMillis() - bTime;<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    }<a name="line.81"></a>
+<span class="sourceLineNo">082</span><a name="line.82"></a>
+<span class="sourceLineNo">083</span>    @Override<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    public long getIdleTimeMillis() {<a name="line.84"></a>
+<span class="sourceLineNo">085</span>        final long elapsed = System.currentTimeMillis() - lastReturnTime;<a name="line.85"></a>
+<span class="sourceLineNo">086</span>     // elapsed may be negative if:<a name="line.86"></a>
+<span class="sourceLineNo">087</span>     // - another thread updates lastReturnTime during the calculation window<a name="line.87"></a>
+<span class="sourceLineNo">088</span>     // - System.currentTimeMillis() is not monotonic (e.g. system time is set back)<a name="line.88"></a>
+<span class="sourceLineNo">089</span>     return elapsed &gt;= 0 ? elapsed : 0;<a name="line.89"></a>
+<span class="sourceLineNo">090</span>    }<a name="line.90"></a>
+<span class="sourceLineNo">091</span><a name="line.91"></a>
+<span class="sourceLineNo">092</span>    @Override<a name="line.92"></a>
+<span class="sourceLineNo">093</span>    public long getLastBorrowTime() {<a name="line.93"></a>
+<span class="sourceLineNo">094</span>        return lastBorrowTime;<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    }<a name="line.95"></a>
+<span class="sourceLineNo">096</span><a name="line.96"></a>
+<span class="sourceLineNo">097</span>    @Override<a name="line.97"></a>
+<span class="sourceLineNo">098</span>    public long getLastReturnTime() {<a name="line.98"></a>
+<span class="sourceLineNo">099</span>        return lastReturnTime;<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    }<a name="line.100"></a>
+<span class="sourceLineNo">101</span><a name="line.101"></a>
+<span class="sourceLineNo">102</span>    /**<a name="line.102"></a>
+<span class="sourceLineNo">103</span>     * Get the number of times this object has been borrowed.<a name="line.103"></a>
+<span class="sourceLineNo">104</span>     * @return The number of times this object has been borrowed.<a name="line.104"></a>
+<span class="sourceLineNo">105</span>     * @since 2.1<a name="line.105"></a>
+<span class="sourceLineNo">106</span>     */<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    public long getBorrowedCount() {<a name="line.107"></a>
+<span class="sourceLineNo">108</span>        return borrowedCount;<a name="line.108"></a>
+<span class="sourceLineNo">109</span>    }<a name="line.109"></a>
+<span class="sourceLineNo">110</span><a name="line.110"></a>
+<span class="sourceLineNo">111</span>    /**<a name="line.111"></a>
+<span class="sourceLineNo">112</span>     * Return an estimate of the last time this object was used.  If the class<a name="line.112"></a>
+<span class="sourceLineNo">113</span>     * of the pooled object implements {@link TrackedUse}, what is returned is<a name="line.113"></a>
+<span class="sourceLineNo">114</span>     * the maximum of {@link TrackedUse#getLastUsed()} and<a name="line.114"></a>
+<span class="sourceLineNo">115</span>     * {@link #getLastBorrowTime()}; otherwise this method gives the same<a name="line.115"></a>
+<span class="sourceLineNo">116</span>     * value as {@link #getLastBorrowTime()}.<a name="line.116"></a>
+<span class="sourceLineNo">117</span>     *<a name="line.117"></a>
+<span class="sourceLineNo">118</span>     * @return the last time this object was used<a name="line.118"></a>
+<span class="sourceLineNo">119</span>     */<a name="line.119"></a>
+<span class="sourceLineNo">120</span>    @Override<a name="line.120"></a>
+<span class="sourceLineNo">121</span>    public long getLastUsedTime() {<a name="line.121"></a>
+<span class="sourceLineNo">122</span>        if (object instanceof TrackedUse) {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>            return Math.max(((TrackedUse) object).getLastUsed(), lastUseTime);<a name="line.123"></a>
+<span class="sourceLineNo">124</span>        }<a name="line.124"></a>
+<span class="sourceLineNo">125</span>        return lastUseTime;<a name="line.125"></a>
+<span class="sourceLineNo">126</span>    }<a name="line.126"></a>
+<span class="sourceLineNo">127</span><a name="line.127"></a>
+<span class="sourceLineNo">128</span>    @Override<a name="line.128"></a>
+<span class="sourceLineNo">129</span>    public int compareTo(final PooledObject&lt;T&gt; other) {<a name="line.129"></a>
+<span class="sourceLineNo">130</span>        final long lastActiveDiff = this.getLastReturnTime() - other.getLastReturnTime();<a name="line.130"></a>
+<span class="sourceLineNo">131</span>        if (lastActiveDiff == 0) {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>            // Make sure the natural ordering is broadly consistent with equals<a name="line.132"></a>
+<span class="sourceLineNo">133</span>            // although this will break down if distinct objects have the same<a name="line.133"></a>
+<span class="sourceLineNo">134</span>            // identity hash code.<a name="line.134"></a>
+<span class="sourceLineNo">135</span>            // see java.lang.Comparable Javadocs<a name="line.135"></a>
+<span class="sourceLineNo">136</span>            return System.identityHashCode(this) - System.identityHashCode(other);<a name="line.136"></a>
+<span class="sourceLineNo">137</span>        }<a name="line.137"></a>
+<span class="sourceLineNo">138</span>        // handle int overflow<a name="line.138"></a>
+<span class="sourceLineNo">139</span>        return (int)Math.min(Math.max(lastActiveDiff, Integer.MIN_VALUE), Integer.MAX_VALUE);<a name="line.139"></a>
+<span class="sourceLineNo">140</span>    }<a name="line.140"></a>
+<span class="sourceLineNo">141</span><a name="line.141"></a>
+<span class="sourceLineNo">142</span>    @Override<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    public String toString() {<a name="line.143"></a>
+<span class="sourceLineNo">144</span>        final StringBuilder result = new StringBuilder();<a name="line.144"></a>
+<span class="sourceLineNo">145</span>        result.append("Object: ");<a name="line.145"></a>
+<span class="sourceLineNo">146</span>        result.append(object.toString());<a name="line.146"></a>
+<span class="sourceLineNo">147</span>        result.append(", State: ");<a name="line.147"></a>
+<span class="sourceLineNo">148</span>        synchronized (this) {<a name="line.148"></a>
+<span class="sourceLineNo">149</span>            result.append(state.toString());<a name="line.149"></a>
+<span class="sourceLineNo">150</span>        }<a name="line.150"></a>
+<span class="sourceLineNo">151</span>        return result.toString();<a name="line.151"></a>
+<span class="sourceLineNo">152</span>        // TODO add other attributes<a name="line.152"></a>
+<span class="sourceLineNo">153</span>    }<a name="line.153"></a>
+<span class="sourceLineNo">154</span><a name="line.154"></a>
+<span class="sourceLineNo">155</span>    @Override<a name="line.155"></a>
+<span class="sourceLineNo">156</span>    public synchronized boolean startEvictionTest() {<a name="line.156"></a>
+<span class="sourceLineNo">157</span>        if (state == PooledObjectState.IDLE) {<a name="line.157"></a>
+<span class="sourceLineNo">158</span>            state = PooledObjectState.EVICTION;<a name="line.158"></a>
+<span class="sourceLineNo">159</span>            return true;<a name="line.159"></a>
+<span class="sourceLineNo">160</span>        }<a name="line.160"></a>
+<span class="sourceLineNo">161</span><a name="line.161"></a>
+<span class="sourceLineNo">162</span>        return false;<a name="line.162"></a>
+<span class="sourceLineNo">163</span>    }<a name="line.163"></a>
+<span class="sourceLineNo">164</span><a name="line.164"></a>
+<span class="sourceLineNo">165</span>    @Override<a name="line.165"></a>
+<span class="sourceLineNo">166</span>    public synchronized boolean endEvictionTest(<a name="line.166"></a>
+<span class="sourceLineNo">167</span>            final Deque&lt;PooledObject&lt;T&gt;&gt; idleQueue) {<a name="line.167"></a>
+<span class="sourceLineNo">168</span>        if (state == PooledObjectState.EVICTION) {<a name="line.168"></a>
+<span class="sourceLineNo">169</span>            state = PooledObjectState.IDLE;<a name="line.169"></a>
+<span class="sourceLineNo">170</span>            return true;<a name="line.170"></a>
+<span class="sourceLineNo">171</span>        } else if (state == PooledObjectState.EVICTION_RETURN_TO_HEAD) {<a name="line.171"></a>
+<span class="sourceLineNo">172</span>            state = PooledObjectState.IDLE;<a name="line.172"></a>
+<span class="sourceLineNo">173</span>            if (!idleQueue.offerFirst(this)) {<a name="line.173"></a>
+<span class="sourceLineNo">174</span>                // TODO - Should never happen<a name="line.174"></a>
+<span class="sourceLineNo">175</span>            }<a name="line.175"></a>
+<span class="sourceLineNo">176</span>        }<a name="line.176"></a>
+<span class="sourceLineNo">177</span><a name="line.177"></a>
+<span class="sourceLineNo">178</span>        return false;<a name="line.178"></a>
+<span class="sourceLineNo">179</span>    }<a name="line.179"></a>
+<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">181</span>    /**<a name="line.181"></a>
+<span class="sourceLineNo">182</span>     * Allocates the object.<a name="line.182"></a>
+<span class="sourceLineNo">183</span>     *<a name="line.183"></a>
+<span class="sourceLineNo">184</span>     * @return {@code true} if the original state was {@link PooledObjectState#IDLE IDLE}<a name="line.184"></a>
+<span class="sourceLineNo">185</span>     */<a name="line.185"></a>
+<span class="sourceLineNo">186</span>    @Override<a name="line.186"></a>
+<span class="sourceLineNo">187</span>    public synchronized boolean allocate() {<a name="line.187"></a>
+<span class="sourceLineNo">188</span>        if (state == PooledObjectState.IDLE) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>            state = PooledObjectState.ALLOCATED;<a name="line.189"></a>
+<span class="sourceLineNo">190</span>            lastBorrowTime = System.currentTimeMillis();<a name="line.190"></a>
+<span class="sourceLineNo">191</span>            lastUseTime = lastBorrowTime;<a name="line.191"></a>
+<span class="sourceLineNo">192</span>            borrowedCount++;<a name="line.192"></a>
+<span class="sourceLineNo">193</span>            if (logAbandoned) {<a name="line.193"></a>
+<span class="sourceLineNo">194</span>                borrowedBy.fillInStackTrace();<a name="line.194"></a>
+<span class="sourceLineNo">195</span>            }<a name="line.195"></a>
+<span class="sourceLineNo">196</span>            return true;<a name="line.196"></a>
+<span class="sourceLineNo">197</span>        } else if (state == PooledObjectState.EVICTION) {<a name="line.197"></a>
+<span class="sourceLineNo">198</span>            // TODO Allocate anyway and ignore eviction test<a name="line.198"></a>
+<span class="sourceLineNo">199</span>            state = PooledObjectState.EVICTION_RETURN_TO_HEAD;<a name="line.199"></a>
+<span class="sourceLineNo">200</span>            return false;<a name="line.200"></a>
+<span class="sourceLineNo">201</span>        }<a name="line.201"></a>
+<span class="sourceLineNo">202</span>        // TODO if validating and testOnBorrow == true then pre-allocate for<a name="line.202"></a>
+<span class="sourceLineNo">203</span>        // performance<a name="line.203"></a>
+<span class="sourceLineNo">204</span>        return false;<a name="line.204"></a>
+<span class="sourceLineNo">205</span>    }<a name="line.205"></a>
+<span class="sourceLineNo">206</span><a name="line.206"></a>
+<span class="sourceLineNo">207</span>    /**<a name="line.207"></a>
+<span class="sourceLineNo">208</span>     * Deallocates the object and sets it {@link PooledObjectState#IDLE IDLE}<a name="line.208"></a>
+<span class="sourceLineNo">209</span>     * if it is currently {@link PooledObjectState#ALLOCATED ALLOCATED}.<a name="line.209"></a>
+<span class="sourceLineNo">210</span>     *<a name="line.210"></a>
+<span class="sourceLineNo">211</span>     * @return {@code true} if the state was {@link PooledObjectState#ALLOCATED ALLOCATED}<a name="line.211"></a>
+<span class="sourceLineNo">212</span>     */<a name="line.212"></a>
+<span class="sourceLineNo">213</span>    @Override<a name="line.213"></a>
+<span class="sourceLineNo">214</span>    public synchronized boolean deallocate() {<a name="line.214"></a>
+<span class="sourceLineNo">215</span>        if (state == PooledObjectState.ALLOCATED ||<a name="line.215"></a>
+<span class="sourceLineNo">216</span>                state == PooledObjectState.RETURNING) {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>            state = PooledObjectState.IDLE;<a name="line.217"></a>
+<span class="sourceLineNo">218</span>            lastReturnTime = System.currentTimeMillis();<a name="line.218"></a>
+<span class="sourceLineNo">219</span>            borrowedBy.clear();<a name="line.219"></a>
+<span class="sourceLineNo">220</span>            return true;<a name="line.220"></a>
+<span class="sourceLineNo">221</span>        }<a name="line.221"></a>
+<span class="sourceLineNo">222</span><a name="line.222"></a>
+<span class="sourceLineNo">223</span>        return false;<a name="line.223"></a>
+<span class="sourceLineNo">224</span>    }<a name="line.224"></a>
+<span class="sourceLineNo">225</span><a name="line.225"></a>
+<span class="sourceLineNo">226</span>    /**<a name="line.226"></a>
+<span class="sourceLineNo">227</span>     * Sets the state to {@link PooledObjectState#INVALID INVALID}<a name="line.227"></a>
+<span class="sourceLineNo">228</span>     */<a name="line.228"></a>
+<span class="sourceLineNo">229</span>    @Override<a name="line.229"></a>
+<span class="sourceLineNo">230</span>    public synchronized void invalidate() {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        state = PooledObjectState.INVALID;<a name="line.231"></a>
+<span class="sourceLineNo">232</span>    }<a name="line.232"></a>
+<span class="sourceLineNo">233</span><a name="line.233"></a>
+<span class="sourceLineNo">234</span>    @Override<a name="line.234"></a>
+<span class="sourceLineNo">235</span>    public void use() {<a name="line.235"></a>
+<span class="sourceLineNo">236</span>        lastUseTime = System.currentTimeMillis();<a name="line.236"></a>
+<span class="sourceLineNo">237</span>        usedBy.fillInStackTrace();<a name="line.237"></a>
+<span class="sourceLineNo">238</span>    }<a name="line.238"></a>
+<span class="sourceLineNo">239</span><a name="line.239"></a>
+<span class="sourceLineNo">240</span>    @Override<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    public void printStackTrace(final PrintWriter writer) {<a name="line.241"></a>
+<span class="sourceLineNo">242</span>        boolean written = borrowedBy.printStackTrace(writer);<a name="line.242"></a>
+<span class="sourceLineNo">243</span>        written |= usedBy.printStackTrace(writer);<a name="line.243"></a>
+<span class="sourceLineNo">244</span>        if (written) {<a name="line.244"></a>
+<span class="sourceLineNo">245</span>            writer.flush();<a name="line.245"></a>
+<span class="sourceLineNo">246</span>        }<a name="line.246"></a>
+<span class="sourceLineNo">247</span>    }<a name="line.247"></a>
+<span class="sourceLineNo">248</span><a name="line.248"></a>
+<span class="sourceLineNo">249</span>    /**<a name="line.249"></a>
+<span class="sourceLineNo">250</span>     * Returns the state of this object.<a name="line.250"></a>
+<span class="sourceLineNo">251</span>     * @return state<a name="line.251"></a>
+<span class="sourceLineNo">252</span>     */<a name="line.252"></a>
+<span class="sourceLineNo">253</span>    @Override<a name="line.253"></a>
+<span class="sourceLineNo">254</span>    public synchronized PooledObjectState getState() {<a name="line.254"></a>
+<span class="sourceLineNo">255</span>        return state;<a name="line.255"></a>
+<span class="sourceLineNo">256</span>    }<a name="line.256"></a>
+<span class="sourceLineNo">257</span><a name="line.257"></a>
+<span class="sourceLineNo">258</span>    /**<a name="line.258"></a>
+<span class="sourceLineNo">259</span>     * Marks the pooled object as abandoned.<a name="line.259"></a>
+<span class="sourceLineNo">260</span>     */<a name="line.260"></a>
+<span class="sourceLineNo">261</span>    @Override<a name="line.261"></a>
+<span class="sourceLineNo">262</span>    public synchronized void markAbandoned() {<a name="line.262"></a>
+<span class="sourceLineNo">263</span>        state = PooledObjectState.ABANDONED;<a name="line.263"></a>
+<span class="sourceLineNo">264</span>    }<a name="line.264"></a>
+<span class="sourceLineNo">265</span><a name="line.265"></a>
+<span class="sourceLineNo">266</span>    /**<a name="line.266"></a>
+<span class="sourceLineNo">267</span>     * Marks the object as returning to the pool.<a name="line.267"></a>
+<span class="sourceLineNo">268</span>     */<a name="line.268"></a>
+<span class="sourceLineNo">269</span>    @Override<a name="line.269"></a>
+<span class="sourceLineNo">270</span>    public synchronized void markReturning() {<a name="line.270"></a>
+<span class="sourceLineNo">271</span>        state = PooledObjectState.RETURNING;<a name="line.271"></a>
+<span class="sourceLineNo">272</span>    }<a name="line.272"></a>
+<span class="sourceLineNo">273</span><a name="line.273"></a>
+<span class="sourceLineNo">274</span>    @Override<a name="line.274"></a>
+<span class="sourceLineNo">275</span>    public void setLogAbandoned(final boolean logAbandoned) {<a name="line.275"></a>
+<span class="sourceLineNo">276</span>        this.logAbandoned = logAbandoned;<a name="line.276"></a>
+<span class="sourceLineNo">277</span>    }<a name="line.277"></a>
+<span class="sourceLineNo">278</span><a name="line.278"></a>
+<span class="sourceLineNo">279</span>}<a name="line.279"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

Added: websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.html (added)
+++ websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObjectInfo.html Sat Oct 28 18:29:09 2017
@@ -0,0 +1,186 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.pool2.impl;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>import java.io.PrintWriter;<a name="line.19"></a>
+<span class="sourceLineNo">020</span>import java.io.StringWriter;<a name="line.20"></a>
+<span class="sourceLineNo">021</span>import java.text.SimpleDateFormat;<a name="line.21"></a>
+<span class="sourceLineNo">022</span><a name="line.22"></a>
+<span class="sourceLineNo">023</span>import org.apache.commons.pool2.PooledObject;<a name="line.23"></a>
+<span class="sourceLineNo">024</span><a name="line.24"></a>
+<span class="sourceLineNo">025</span>/**<a name="line.25"></a>
+<span class="sourceLineNo">026</span> * Implementation of object that is used to provide information on pooled<a name="line.26"></a>
+<span class="sourceLineNo">027</span> * objects via JMX.<a name="line.27"></a>
+<span class="sourceLineNo">028</span> *<a name="line.28"></a>
+<span class="sourceLineNo">029</span> * @since 2.0<a name="line.29"></a>
+<span class="sourceLineNo">030</span> */<a name="line.30"></a>
+<span class="sourceLineNo">031</span>public class DefaultPooledObjectInfo implements DefaultPooledObjectInfoMBean {<a name="line.31"></a>
+<span class="sourceLineNo">032</span><a name="line.32"></a>
+<span class="sourceLineNo">033</span>    private final PooledObject&lt;?&gt; pooledObject;<a name="line.33"></a>
+<span class="sourceLineNo">034</span><a name="line.34"></a>
+<span class="sourceLineNo">035</span>    /**<a name="line.35"></a>
+<span class="sourceLineNo">036</span>     * Create a new instance for the given pooled object.<a name="line.36"></a>
+<span class="sourceLineNo">037</span>     *<a name="line.37"></a>
+<span class="sourceLineNo">038</span>     * @param pooledObject The pooled object that this instance will represent<a name="line.38"></a>
+<span class="sourceLineNo">039</span>     */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    public DefaultPooledObjectInfo(final PooledObject&lt;?&gt; pooledObject) {<a name="line.40"></a>
+<span class="sourceLineNo">041</span>        this.pooledObject = pooledObject;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    }<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>    @Override<a name="line.44"></a>
+<span class="sourceLineNo">045</span>    public long getCreateTime() {<a name="line.45"></a>
+<span class="sourceLineNo">046</span>        return pooledObject.getCreateTime();<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    }<a name="line.47"></a>
+<span class="sourceLineNo">048</span><a name="line.48"></a>
+<span class="sourceLineNo">049</span>    @Override<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    public String getCreateTimeFormatted() {<a name="line.50"></a>
+<span class="sourceLineNo">051</span>        final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");<a name="line.51"></a>
+<span class="sourceLineNo">052</span>        return sdf.format(Long.valueOf(pooledObject.getCreateTime()));<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    }<a name="line.53"></a>
+<span class="sourceLineNo">054</span><a name="line.54"></a>
+<span class="sourceLineNo">055</span>    @Override<a name="line.55"></a>
+<span class="sourceLineNo">056</span>    public long getLastBorrowTime() {<a name="line.56"></a>
+<span class="sourceLineNo">057</span>        return pooledObject.getLastBorrowTime();<a name="line.57"></a>
+<span class="sourceLineNo">058</span>    }<a name="line.58"></a>
+<span class="sourceLineNo">059</span><a name="line.59"></a>
+<span class="sourceLineNo">060</span>    @Override<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    public String getLastBorrowTimeFormatted() {<a name="line.61"></a>
+<span class="sourceLineNo">062</span>        final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");<a name="line.62"></a>
+<span class="sourceLineNo">063</span>        return sdf.format(Long.valueOf(pooledObject.getLastBorrowTime()));<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    }<a name="line.64"></a>
+<span class="sourceLineNo">065</span><a name="line.65"></a>
+<span class="sourceLineNo">066</span>    @Override<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    public String getLastBorrowTrace() {<a name="line.67"></a>
+<span class="sourceLineNo">068</span>        final StringWriter sw = new StringWriter();<a name="line.68"></a>
+<span class="sourceLineNo">069</span>        pooledObject.printStackTrace(new PrintWriter(sw));<a name="line.69"></a>
+<span class="sourceLineNo">070</span>        return sw.toString();<a name="line.70"></a>
+<span class="sourceLineNo">071</span>    }<a name="line.71"></a>
+<span class="sourceLineNo">072</span><a name="line.72"></a>
+<span class="sourceLineNo">073</span>    @Override<a name="line.73"></a>
+<span class="sourceLineNo">074</span>    public long getLastReturnTime() {<a name="line.74"></a>
+<span class="sourceLineNo">075</span>        return pooledObject.getLastReturnTime();<a name="line.75"></a>
+<span class="sourceLineNo">076</span>    }<a name="line.76"></a>
+<span class="sourceLineNo">077</span><a name="line.77"></a>
+<span class="sourceLineNo">078</span>    @Override<a name="line.78"></a>
+<span class="sourceLineNo">079</span>    public String getLastReturnTimeFormatted() {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>        final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");<a name="line.80"></a>
+<span class="sourceLineNo">081</span>        return sdf.format(Long.valueOf(pooledObject.getLastReturnTime()));<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    }<a name="line.82"></a>
+<span class="sourceLineNo">083</span><a name="line.83"></a>
+<span class="sourceLineNo">084</span>    @Override<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    public String getPooledObjectType() {<a name="line.85"></a>
+<span class="sourceLineNo">086</span>        return pooledObject.getObject().getClass().getName();<a name="line.86"></a>
+<span class="sourceLineNo">087</span>    }<a name="line.87"></a>
+<span class="sourceLineNo">088</span><a name="line.88"></a>
+<span class="sourceLineNo">089</span>    @Override<a name="line.89"></a>
+<span class="sourceLineNo">090</span>    public String getPooledObjectToString() {<a name="line.90"></a>
+<span class="sourceLineNo">091</span>        return pooledObject.getObject().toString();<a name="line.91"></a>
+<span class="sourceLineNo">092</span>    }<a name="line.92"></a>
+<span class="sourceLineNo">093</span><a name="line.93"></a>
+<span class="sourceLineNo">094</span>    @Override<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    public long getBorrowedCount() {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>        // TODO Simplify this once getBorrowedCount has been added to PooledObject<a name="line.96"></a>
+<span class="sourceLineNo">097</span>        if (pooledObject instanceof DefaultPooledObject) {<a name="line.97"></a>
+<span class="sourceLineNo">098</span>            return ((DefaultPooledObject&lt;?&gt;) pooledObject).getBorrowedCount();<a name="line.98"></a>
+<span class="sourceLineNo">099</span>        }<a name="line.99"></a>
+<span class="sourceLineNo">100</span>        return -1;<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    }<a name="line.101"></a>
+<span class="sourceLineNo">102</span><a name="line.102"></a>
+<span class="sourceLineNo">103</span>    /**<a name="line.103"></a>
+<span class="sourceLineNo">104</span>     * @since 2.4.3<a name="line.104"></a>
+<span class="sourceLineNo">105</span>     */<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    @Override<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    public String toString() {<a name="line.107"></a>
+<span class="sourceLineNo">108</span>        final StringBuilder builder = new StringBuilder();<a name="line.108"></a>
+<span class="sourceLineNo">109</span>        builder.append("DefaultPooledObjectInfo [pooledObject=");<a name="line.109"></a>
+<span class="sourceLineNo">110</span>        builder.append(pooledObject);<a name="line.110"></a>
+<span class="sourceLineNo">111</span>        builder.append("]");<a name="line.111"></a>
+<span class="sourceLineNo">112</span>        return builder.toString();<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    }<a name="line.113"></a>
+<span class="sourceLineNo">114</span>}<a name="line.114"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

Added: websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.html (added)
+++ websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/DefaultPooledObjectInfoMBean.html Sat Oct 28 18:29:09 2017
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.pool2.impl;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>/**<a name="line.19"></a>
+<span class="sourceLineNo">020</span> * The interface that defines the information about pooled objects that will be<a name="line.20"></a>
+<span class="sourceLineNo">021</span> * exposed via JMX.<a name="line.21"></a>
+<span class="sourceLineNo">022</span> *<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * NOTE: This interface exists only to define those attributes and methods that<a name="line.23"></a>
+<span class="sourceLineNo">024</span> *       will be made available via JMX. It must not be implemented by clients<a name="line.24"></a>
+<span class="sourceLineNo">025</span> *       as it is subject to change between major, minor and patch version<a name="line.25"></a>
+<span class="sourceLineNo">026</span> *       releases of commons pool. Clients that implement this interface may<a name="line.26"></a>
+<span class="sourceLineNo">027</span> *       not, therefore, be able to upgrade to a new minor or patch release<a name="line.27"></a>
+<span class="sourceLineNo">028</span> *       without requiring code changes.<a name="line.28"></a>
+<span class="sourceLineNo">029</span> *<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * @since 2.0<a name="line.30"></a>
+<span class="sourceLineNo">031</span> */<a name="line.31"></a>
+<span class="sourceLineNo">032</span>public interface DefaultPooledObjectInfoMBean {<a name="line.32"></a>
+<span class="sourceLineNo">033</span>    /**<a name="line.33"></a>
+<span class="sourceLineNo">034</span>     * Obtain the time (using the same basis as<a name="line.34"></a>
+<span class="sourceLineNo">035</span>     * {@link System#currentTimeMillis()}) that pooled object was created.<a name="line.35"></a>
+<span class="sourceLineNo">036</span>     *<a name="line.36"></a>
+<span class="sourceLineNo">037</span>     * @return The creation time for the pooled object<a name="line.37"></a>
+<span class="sourceLineNo">038</span>     */<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    long getCreateTime();<a name="line.39"></a>
+<span class="sourceLineNo">040</span><a name="line.40"></a>
+<span class="sourceLineNo">041</span>    /**<a name="line.41"></a>
+<span class="sourceLineNo">042</span>     * Obtain the time that pooled object was created.<a name="line.42"></a>
+<span class="sourceLineNo">043</span>     *<a name="line.43"></a>
+<span class="sourceLineNo">044</span>     * @return The creation time for the pooled object formated as<a name="line.44"></a>
+<span class="sourceLineNo">045</span>     *         &lt;code&gt;yyyy-MM-dd HH:mm:ss Z&lt;/code&gt;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>     */<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    String getCreateTimeFormatted();<a name="line.47"></a>
+<span class="sourceLineNo">048</span><a name="line.48"></a>
+<span class="sourceLineNo">049</span>    /**<a name="line.49"></a>
+<span class="sourceLineNo">050</span>     * Obtain the time (using the same basis as<a name="line.50"></a>
+<span class="sourceLineNo">051</span>     * {@link System#currentTimeMillis()}) the polled object was last borrowed.<a name="line.51"></a>
+<span class="sourceLineNo">052</span>     *<a name="line.52"></a>
+<span class="sourceLineNo">053</span>     * @return The time the pooled object was last borrowed<a name="line.53"></a>
+<span class="sourceLineNo">054</span>     */<a name="line.54"></a>
+<span class="sourceLineNo">055</span>    long getLastBorrowTime();<a name="line.55"></a>
+<span class="sourceLineNo">056</span><a name="line.56"></a>
+<span class="sourceLineNo">057</span>    /**<a name="line.57"></a>
+<span class="sourceLineNo">058</span>     * Obtain the time that pooled object was last borrowed.<a name="line.58"></a>
+<span class="sourceLineNo">059</span>     *<a name="line.59"></a>
+<span class="sourceLineNo">060</span>     * @return The last borrowed time for the pooled object formated as<a name="line.60"></a>
+<span class="sourceLineNo">061</span>     *         &lt;code&gt;yyyy-MM-dd HH:mm:ss Z&lt;/code&gt;<a name="line.61"></a>
+<span class="sourceLineNo">062</span>     */<a name="line.62"></a>
+<span class="sourceLineNo">063</span>    String getLastBorrowTimeFormatted();<a name="line.63"></a>
+<span class="sourceLineNo">064</span><a name="line.64"></a>
+<span class="sourceLineNo">065</span>    /**<a name="line.65"></a>
+<span class="sourceLineNo">066</span>     * Obtain the stack trace recorded when the pooled object was last borrowed.<a name="line.66"></a>
+<span class="sourceLineNo">067</span>     *<a name="line.67"></a>
+<span class="sourceLineNo">068</span>     * @return The stack trace showing which code last borrowed the pooled<a name="line.68"></a>
+<span class="sourceLineNo">069</span>     *         object<a name="line.69"></a>
+<span class="sourceLineNo">070</span>     */<a name="line.70"></a>
+<span class="sourceLineNo">071</span>    String getLastBorrowTrace();<a name="line.71"></a>
+<span class="sourceLineNo">072</span><a name="line.72"></a>
+<span class="sourceLineNo">073</span><a name="line.73"></a>
+<span class="sourceLineNo">074</span>    /**<a name="line.74"></a>
+<span class="sourceLineNo">075</span>     * Obtain the time (using the same basis as<a name="line.75"></a>
+<span class="sourceLineNo">076</span>     * {@link System#currentTimeMillis()})the wrapped object was last returned.<a name="line.76"></a>
+<span class="sourceLineNo">077</span>     *<a name="line.77"></a>
+<span class="sourceLineNo">078</span>     * @return The time the object was last returned<a name="line.78"></a>
+<span class="sourceLineNo">079</span>     */<a name="line.79"></a>
+<span class="sourceLineNo">080</span>    long getLastReturnTime();<a name="line.80"></a>
+<span class="sourceLineNo">081</span><a name="line.81"></a>
+<span class="sourceLineNo">082</span>    /**<a name="line.82"></a>
+<span class="sourceLineNo">083</span>     * Obtain the time that pooled object was last returned.<a name="line.83"></a>
+<span class="sourceLineNo">084</span>     *<a name="line.84"></a>
+<span class="sourceLineNo">085</span>     * @return The last returned time for the pooled object formated as<a name="line.85"></a>
+<span class="sourceLineNo">086</span>     *         &lt;code&gt;yyyy-MM-dd HH:mm:ss Z&lt;/code&gt;<a name="line.86"></a>
+<span class="sourceLineNo">087</span>     */<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    String getLastReturnTimeFormatted();<a name="line.88"></a>
+<span class="sourceLineNo">089</span><a name="line.89"></a>
+<span class="sourceLineNo">090</span>    /**<a name="line.90"></a>
+<span class="sourceLineNo">091</span>     * Obtain the name of the class of the pooled object.<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     *<a name="line.92"></a>
+<span class="sourceLineNo">093</span>     * @return The pooled object's class name<a name="line.93"></a>
+<span class="sourceLineNo">094</span>     *<a name="line.94"></a>
+<span class="sourceLineNo">095</span>     * @see Class#getName()<a name="line.95"></a>
+<span class="sourceLineNo">096</span>     */<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    String getPooledObjectType();<a name="line.97"></a>
+<span class="sourceLineNo">098</span><a name="line.98"></a>
+<span class="sourceLineNo">099</span>    /**<a name="line.99"></a>
+<span class="sourceLineNo">100</span>     * Provides a String form of the wrapper for debug purposes. The format is<a name="line.100"></a>
+<span class="sourceLineNo">101</span>     * not fixed and may change at any time.<a name="line.101"></a>
+<span class="sourceLineNo">102</span>     *<a name="line.102"></a>
+<span class="sourceLineNo">103</span>     * @return A string representation of the pooled object<a name="line.103"></a>
+<span class="sourceLineNo">104</span>     *<a name="line.104"></a>
+<span class="sourceLineNo">105</span>     * @see Object#toString()<a name="line.105"></a>
+<span class="sourceLineNo">106</span>     */<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    String getPooledObjectToString();<a name="line.107"></a>
+<span class="sourceLineNo">108</span><a name="line.108"></a>
+<span class="sourceLineNo">109</span>    /**<a name="line.109"></a>
+<span class="sourceLineNo">110</span>     * Get the number of times this object has been borrowed.<a name="line.110"></a>
+<span class="sourceLineNo">111</span>     * @return The number of times this object has been borrowed.<a name="line.111"></a>
+<span class="sourceLineNo">112</span>     * @since 2.1<a name="line.112"></a>
+<span class="sourceLineNo">113</span>     */<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    long getBorrowedCount();<a name="line.114"></a>
+<span class="sourceLineNo">115</span>}<a name="line.115"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

Added: websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/EvictionConfig.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/EvictionConfig.html (added)
+++ websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/EvictionConfig.html Sat Oct 28 18:29:09 2017
@@ -0,0 +1,186 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.pool2.impl;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>/**<a name="line.19"></a>
+<span class="sourceLineNo">020</span> * This class is used by pool implementations to pass configuration information<a name="line.20"></a>
+<span class="sourceLineNo">021</span> * to {@link EvictionPolicy} instances. The {@link EvictionPolicy} may also have<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * its own specific configuration attributes.<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * &lt;p&gt;<a name="line.23"></a>
+<span class="sourceLineNo">024</span> * This class is immutable and thread-safe.<a name="line.24"></a>
+<span class="sourceLineNo">025</span> *<a name="line.25"></a>
+<span class="sourceLineNo">026</span> * @since 2.0<a name="line.26"></a>
+<span class="sourceLineNo">027</span> */<a name="line.27"></a>
+<span class="sourceLineNo">028</span>public class EvictionConfig {<a name="line.28"></a>
+<span class="sourceLineNo">029</span><a name="line.29"></a>
+<span class="sourceLineNo">030</span>    private final long idleEvictTime;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>    private final long idleSoftEvictTime;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>    private final int minIdle;<a name="line.32"></a>
+<span class="sourceLineNo">033</span><a name="line.33"></a>
+<span class="sourceLineNo">034</span>    /**<a name="line.34"></a>
+<span class="sourceLineNo">035</span>     * Create a new eviction configuration with the specified parameters.<a name="line.35"></a>
+<span class="sourceLineNo">036</span>     * Instances are immutable.<a name="line.36"></a>
+<span class="sourceLineNo">037</span>     *<a name="line.37"></a>
+<span class="sourceLineNo">038</span>     * @param poolIdleEvictTime Expected to be provided by<a name="line.38"></a>
+<span class="sourceLineNo">039</span>     *        {@link BaseGenericObjectPool#getMinEvictableIdleTimeMillis()}<a name="line.39"></a>
+<span class="sourceLineNo">040</span>     * @param poolIdleSoftEvictTime Expected to be provided by<a name="line.40"></a>
+<span class="sourceLineNo">041</span>     *        {@link BaseGenericObjectPool#getSoftMinEvictableIdleTimeMillis()}<a name="line.41"></a>
+<span class="sourceLineNo">042</span>     * @param minIdle Expected to be provided by<a name="line.42"></a>
+<span class="sourceLineNo">043</span>     *        {@link GenericObjectPool#getMinIdle()} or<a name="line.43"></a>
+<span class="sourceLineNo">044</span>     *        {@link GenericKeyedObjectPool#getMinIdlePerKey()}<a name="line.44"></a>
+<span class="sourceLineNo">045</span>     */<a name="line.45"></a>
+<span class="sourceLineNo">046</span>    public EvictionConfig(final long poolIdleEvictTime, final long poolIdleSoftEvictTime,<a name="line.46"></a>
+<span class="sourceLineNo">047</span>            final int minIdle) {<a name="line.47"></a>
+<span class="sourceLineNo">048</span>        if (poolIdleEvictTime &gt; 0) {<a name="line.48"></a>
+<span class="sourceLineNo">049</span>            idleEvictTime = poolIdleEvictTime;<a name="line.49"></a>
+<span class="sourceLineNo">050</span>        } else {<a name="line.50"></a>
+<span class="sourceLineNo">051</span>            idleEvictTime = Long.MAX_VALUE;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>        }<a name="line.52"></a>
+<span class="sourceLineNo">053</span>        if (poolIdleSoftEvictTime &gt; 0) {<a name="line.53"></a>
+<span class="sourceLineNo">054</span>            idleSoftEvictTime = poolIdleSoftEvictTime;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>        } else {<a name="line.55"></a>
+<span class="sourceLineNo">056</span>            idleSoftEvictTime  = Long.MAX_VALUE;<a name="line.56"></a>
+<span class="sourceLineNo">057</span>        }<a name="line.57"></a>
+<span class="sourceLineNo">058</span>        this.minIdle = minIdle;<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    }<a name="line.59"></a>
+<span class="sourceLineNo">060</span><a name="line.60"></a>
+<span class="sourceLineNo">061</span>    /**<a name="line.61"></a>
+<span class="sourceLineNo">062</span>     * Obtain the {@code idleEvictTime} for this eviction configuration<a name="line.62"></a>
+<span class="sourceLineNo">063</span>     * instance.<a name="line.63"></a>
+<span class="sourceLineNo">064</span>     * &lt;p&gt;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>     * How the evictor behaves based on this value will be determined by the<a name="line.65"></a>
+<span class="sourceLineNo">066</span>     * configured {@link EvictionPolicy}.<a name="line.66"></a>
+<span class="sourceLineNo">067</span>     *<a name="line.67"></a>
+<span class="sourceLineNo">068</span>     * @return The {@code idleEvictTime} in milliseconds<a name="line.68"></a>
+<span class="sourceLineNo">069</span>     */<a name="line.69"></a>
+<span class="sourceLineNo">070</span>    public long getIdleEvictTime() {<a name="line.70"></a>
+<span class="sourceLineNo">071</span>        return idleEvictTime;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    }<a name="line.72"></a>
+<span class="sourceLineNo">073</span><a name="line.73"></a>
+<span class="sourceLineNo">074</span>    /**<a name="line.74"></a>
+<span class="sourceLineNo">075</span>     * Obtain the {@code idleSoftEvictTime} for this eviction configuration<a name="line.75"></a>
+<span class="sourceLineNo">076</span>     * instance.<a name="line.76"></a>
+<span class="sourceLineNo">077</span>     * &lt;p&gt;<a name="line.77"></a>
+<span class="sourceLineNo">078</span>     * How the evictor behaves based on this value will be determined by the<a name="line.78"></a>
+<span class="sourceLineNo">079</span>     * configured {@link EvictionPolicy}.<a name="line.79"></a>
+<span class="sourceLineNo">080</span>     *<a name="line.80"></a>
+<span class="sourceLineNo">081</span>     * @return The (@code idleSoftEvictTime} in milliseconds<a name="line.81"></a>
+<span class="sourceLineNo">082</span>     */<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    public long getIdleSoftEvictTime() {<a name="line.83"></a>
+<span class="sourceLineNo">084</span>        return idleSoftEvictTime;<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    }<a name="line.85"></a>
+<span class="sourceLineNo">086</span><a name="line.86"></a>
+<span class="sourceLineNo">087</span>    /**<a name="line.87"></a>
+<span class="sourceLineNo">088</span>     * Obtain the {@code minIdle} for this eviction configuration instance.<a name="line.88"></a>
+<span class="sourceLineNo">089</span>     * &lt;p&gt;<a name="line.89"></a>
+<span class="sourceLineNo">090</span>     * How the evictor behaves based on this value will be determined by the<a name="line.90"></a>
+<span class="sourceLineNo">091</span>     * configured {@link EvictionPolicy}.<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     *<a name="line.92"></a>
+<span class="sourceLineNo">093</span>     * @return The {@code minIdle}<a name="line.93"></a>
+<span class="sourceLineNo">094</span>     */<a name="line.94"></a>
+<span class="sourceLineNo">095</span>    public int getMinIdle() {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>        return minIdle;<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    }<a name="line.97"></a>
+<span class="sourceLineNo">098</span><a name="line.98"></a>
+<span class="sourceLineNo">099</span>    /**<a name="line.99"></a>
+<span class="sourceLineNo">100</span>     * @since 2.4<a name="line.100"></a>
+<span class="sourceLineNo">101</span>     */<a name="line.101"></a>
+<span class="sourceLineNo">102</span>    @Override<a name="line.102"></a>
+<span class="sourceLineNo">103</span>    public String toString() {<a name="line.103"></a>
+<span class="sourceLineNo">104</span>        final StringBuilder builder = new StringBuilder();<a name="line.104"></a>
+<span class="sourceLineNo">105</span>        builder.append("EvictionConfig [idleEvictTime=");<a name="line.105"></a>
+<span class="sourceLineNo">106</span>        builder.append(idleEvictTime);<a name="line.106"></a>
+<span class="sourceLineNo">107</span>        builder.append(", idleSoftEvictTime=");<a name="line.107"></a>
+<span class="sourceLineNo">108</span>        builder.append(idleSoftEvictTime);<a name="line.108"></a>
+<span class="sourceLineNo">109</span>        builder.append(", minIdle=");<a name="line.109"></a>
+<span class="sourceLineNo">110</span>        builder.append(minIdle);<a name="line.110"></a>
+<span class="sourceLineNo">111</span>        builder.append("]");<a name="line.111"></a>
+<span class="sourceLineNo">112</span>        return builder.toString();<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    }<a name="line.113"></a>
+<span class="sourceLineNo">114</span>}<a name="line.114"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

Added: websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/EvictionPolicy.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/EvictionPolicy.html (added)
+++ websites/production/commons/content/proper/commons-pool/api-2.4.3/src-html/org/apache/commons/pool2/impl/EvictionPolicy.html Sat Oct 28 18:29:09 2017
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.pool2.impl;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>import org.apache.commons.pool2.PooledObject;<a name="line.19"></a>
+<span class="sourceLineNo">020</span><a name="line.20"></a>
+<span class="sourceLineNo">021</span>/**<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * To provide a custom eviction policy (i.e. something other than {@link<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * DefaultEvictionPolicy} for a pool, users must provide an implementation of<a name="line.23"></a>
+<span class="sourceLineNo">024</span> * this interface that provides the required eviction policy.<a name="line.24"></a>
+<span class="sourceLineNo">025</span> *<a name="line.25"></a>
+<span class="sourceLineNo">026</span> * @param &lt;T&gt; the type of objects in the pool<a name="line.26"></a>
+<span class="sourceLineNo">027</span> *<a name="line.27"></a>
+<span class="sourceLineNo">028</span> * @since 2.0<a name="line.28"></a>
+<span class="sourceLineNo">029</span> */<a name="line.29"></a>
+<span class="sourceLineNo">030</span>public interface EvictionPolicy&lt;T&gt; {<a name="line.30"></a>
+<span class="sourceLineNo">031</span><a name="line.31"></a>
+<span class="sourceLineNo">032</span>    /**<a name="line.32"></a>
+<span class="sourceLineNo">033</span>     * This method is called to test if an idle object in the pool should be<a name="line.33"></a>
+<span class="sourceLineNo">034</span>     * evicted or not.<a name="line.34"></a>
+<span class="sourceLineNo">035</span>     *<a name="line.35"></a>
+<span class="sourceLineNo">036</span>     * @param config    The pool configuration settings related to eviction<a name="line.36"></a>
+<span class="sourceLineNo">037</span>     * @param underTest The pooled object being tested for eviction<a name="line.37"></a>
+<span class="sourceLineNo">038</span>     * @param idleCount The current number of idle objects in the pool including<a name="line.38"></a>
+<span class="sourceLineNo">039</span>     *                      the object under test<a name="line.39"></a>
+<span class="sourceLineNo">040</span>     * @return &lt;code&gt;true&lt;/code&gt; if the object should be evicted, otherwise<a name="line.40"></a>
+<span class="sourceLineNo">041</span>     *             &lt;code&gt;false&lt;/code&gt;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>     */<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    boolean evict(EvictionConfig config, PooledObject&lt;T&gt; underTest,<a name="line.43"></a>
+<span class="sourceLineNo">044</span>            int idleCount);<a name="line.44"></a>
+<span class="sourceLineNo">045</span>}<a name="line.45"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>



Mime
View raw message