/usr/share/doc/libcommons-pool-java/api/org/apache/commons/pool/PoolUtils.html is in libcommons-pool-java-doc 1.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html>
<head>
<title>PoolUtils (Apache Commons Object Pooling Package)</title>
<meta name="date" content="2016-07-07">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PoolUtils (Apache Commons Object Pooling Package)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="../../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><span class="typeNameLink">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/pool/PoolUtils.html" target="_top">Frames</a></li>
<li><a href="PoolUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.pool</div>
<h2 title="Class PoolUtils" class="title">Class PoolUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.pool.PoolUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">PoolUtils</span>
extends <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class consists exclusively of static methods that operate on or return ObjectPool
or KeyedObjectPool related interfaces.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="simpleTagLabel">Version:</span></dt>
<dd>$Revision: 1222670 $ $Date: 2011-12-23 08:18:25 -0500 (Fri, 23 Dec 2011) $</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Sandy McArthur</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#PoolUtils--">PoolUtils</a></span>()</code>
<div class="block">PoolUtils instances should NOT be constructed in standard programming.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static <V> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedObjectPool-">adapt</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>,V> keyedPool)</code>
<div class="block">Adapt a <code>KeyedObjectPool</code> instance to work where an <code>ObjectPool</code> is needed.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <V> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedObjectPool-java.lang.Object-">adapt</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</code>
<div class="block">Adapt a <code>KeyedObjectPool</code> instance to work where an <code>ObjectPool</code> is needed using the
specified <code>key</code> when delegating.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-K-">adapt</a></span>(<a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V> keyedFactory,
K key)</code>
<div class="block">Adapt a <code>KeyedPoolableObjectFactory</code> instance to work where a <code>PoolableObjectFactory</code> is
needed using the specified <code>key</code> when delegating.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <V> <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-">adapt</a></span>(<a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>,V> keyedFactory)</code>
<div class="block">Adapt a <code>KeyedPoolableObjectFactory</code> instance to work where a <code>PoolableObjectFactory</code> is
needed.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.ObjectPool-">adapt</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><V> pool)</code>
<div class="block">Adapt an <code>ObjectPool</code> to work where an <code>KeyedObjectPool</code> is needed.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.PoolableObjectFactory-">adapt</a></span>(<a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><V> factory)</code>
<div class="block">Adapt a <code>PoolableObjectFactory</code> instance to work where a <code>KeyedPoolableObjectFactory</code> is
needed.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkedPool-org.apache.commons.pool.KeyedObjectPool-java.lang.Class-">checkedPool</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><V> type)</code>
<div class="block">Wraps a <code>KeyedObjectPool</code> and dynamically checks the type of objects borrowed and returned to the keyedPool.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkedPool-org.apache.commons.pool.ObjectPool-java.lang.Class-">checkedPool</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</code>
<div class="block">Wraps an <code>ObjectPool</code> and dynamically checks the type of objects borrowed and returned to the pool.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="/usr/share/doc/default-jdk-doc/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><K,<a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkMinIdle-org.apache.commons.pool.KeyedObjectPool-java.util.Collection-int-long-">checkMinIdle</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><? extends K> keys,
int minIdle,
long period)</code>
<div class="block">Periodically check the idle object count for each key in the <code>Collection</code> <code>keys</code> in the keyedPool.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static <K,V> <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkMinIdle-org.apache.commons.pool.KeyedObjectPool-K-int-long-">checkMinIdle</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
K key,
int minIdle,
long period)</code>
<div class="block">Periodically check the idle object count for the key in the keyedPool.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <T> <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkMinIdle-org.apache.commons.pool.ObjectPool-int-long-">checkMinIdle</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
int minIdle,
long period)</code>
<div class="block">Periodically check the idle object count for the pool.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkRethrow-java.lang.Throwable-">checkRethrow</a></span>(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> t)</code>
<div class="block">Should the supplied Throwable be re-thrown (eg if it is an instance of
one of the Throwables that should never be swallowed).</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-">erodingPool</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool)</code>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-float-">erodingPool</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
float factor)</code>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-float-boolean-">erodingPool</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
float factor,
boolean perKey)</code>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.ObjectPool-">erodingPool</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool)</code>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.ObjectPool-float-">erodingPool</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
float factor)</code>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <K,V> void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#prefill-org.apache.commons.pool.KeyedObjectPool-java.util.Collection-int-">prefill</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><? extends K> keys,
int count)</code>
<div class="block">Call <code>addObject(Object)</code> on <code>keyedPool</code> with each key in <code>keys</code> for
<code>count</code> number of times.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static <K,V> void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#prefill-org.apache.commons.pool.KeyedObjectPool-K-int-">prefill</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
K key,
int count)</code>
<div class="block">Call <code>addObject(Object)</code> on <code>keyedPool</code> with <code>key</code> <code>count</code>
number of times.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <T> void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#prefill-org.apache.commons.pool.ObjectPool-int-">prefill</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
int count)</code>
<div class="block">Call <code>addObject()</code> on <code>pool</code> <code>count</code> number of times.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#synchronizedPool-org.apache.commons.pool.KeyedObjectPool-">synchronizedPool</a></span>(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool)</code>
<div class="block">Returns a synchronized (thread-safe) KeyedObjectPool backed by the specified KeyedObjectPool.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#synchronizedPool-org.apache.commons.pool.ObjectPool-">synchronizedPool</a></span>(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool)</code>
<div class="block">Returns a synchronized (thread-safe) ObjectPool backed by the specified ObjectPool.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static <K,V> <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#synchronizedPoolableFactory-org.apache.commons.pool.KeyedPoolableObjectFactory-">synchronizedPoolableFactory</a></span>(<a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V> keyedFactory)</code>
<div class="block">Returns a synchronized (thread-safe) KeyedPoolableObjectFactory backed by the specified KeyedPoolableObjectFactory.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static <T> <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><T></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/pool/PoolUtils.html#synchronizedPoolableFactory-org.apache.commons.pool.PoolableObjectFactory-">synchronizedPoolableFactory</a></span>(<a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><T> factory)</code>
<div class="block">Returns a synchronized (thread-safe) PoolableObjectFactory backed by the specified PoolableObjectFactory.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="PoolUtils--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PoolUtils</h4>
<pre>public PoolUtils()</pre>
<div class="block">PoolUtils instances should NOT be constructed in standard programming.
Instead, the class should be used procedurally: PoolUtils.adapt(aPool);.
This constructor is public to permit tools that require a JavaBean instance to operate.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="adapt-org.apache.commons.pool.KeyedObjectPool-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adapt</h4>
<pre>public static <V> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><V> adapt(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>,V> keyedPool)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Adapt a <code>KeyedObjectPool</code> instance to work where an <code>ObjectPool</code> is needed. This is the
equivalent of calling <a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedObjectPool-java.lang.Object-"><code>PoolUtils.adapt(aKeyedObjectPool, new Object())</code></a>.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool"><code>KeyedObjectPool</code></a> to delegate to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool"><code>ObjectPool</code></a> that delegates to <code>keyedPool</code> with an internal key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedPool</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedObjectPool-java.lang.Object-"><code>adapt(KeyedObjectPool, Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="adapt-org.apache.commons.pool.KeyedObjectPool-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adapt</h4>
<pre>public static <V> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><V> adapt(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Adapt a <code>KeyedObjectPool</code> instance to work where an <code>ObjectPool</code> is needed using the
specified <code>key</code> when delegating.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool"><code>KeyedObjectPool</code></a> to delegate to.</dd>
<dd><code>key</code> - the key to use when delegating.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool"><code>ObjectPool</code></a> that delegates to <code>keyedPool</code> with the specified key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedPool</code> or <code>key</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedObjectPool-"><code>adapt(KeyedObjectPool)</code></a></dd>
</dl>
</li>
</ul>
<a name="adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-java.lang.Object-">
<!-- -->
</a><a name="adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-K-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adapt</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><V> adapt(<a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V> keyedFactory,
K key)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Adapt a <code>KeyedPoolableObjectFactory</code> instance to work where a <code>PoolableObjectFactory</code> is
needed using the specified <code>key</code> when delegating.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedFactory</code> - the <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool"><code>KeyedPoolableObjectFactory</code></a> to delegate to.</dd>
<dd><code>key</code> - the key to use when delegating.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><code>PoolableObjectFactory</code></a> that delegates to <code>keyedFactory</code> with the specified key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedFactory</code> or <code>key</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-"><code>adapt(KeyedPoolableObjectFactory)</code></a></dd>
</dl>
</li>
</ul>
<a name="adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adapt</h4>
<pre>public static <V> <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><V> adapt(<a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>,V> keyedFactory)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Adapt a <code>KeyedPoolableObjectFactory</code> instance to work where a <code>PoolableObjectFactory</code> is
needed. This method is the equivalent of calling
<a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-K-"><code>PoolUtils.adapt(aKeyedPoolableObjectFactory, new Object())</code></a>.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedFactory</code> - the <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool"><code>KeyedPoolableObjectFactory</code></a> to delegate to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><code>PoolableObjectFactory</code></a> that delegates to <code>keyedFactory</code> with an internal key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedFactory</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#adapt-org.apache.commons.pool.KeyedPoolableObjectFactory-K-"><code>adapt(KeyedPoolableObjectFactory, Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="adapt-org.apache.commons.pool.ObjectPool-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adapt</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> adapt(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><V> pool)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Adapt an <code>ObjectPool</code> to work where an <code>KeyedObjectPool</code> is needed.
The key is ignored.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool"><code>ObjectPool</code></a> to delegate to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool"><code>KeyedObjectPool</code></a> that delegates to <code>pool</code> ignoring the key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>pool</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="adapt-org.apache.commons.pool.PoolableObjectFactory-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>adapt</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V> adapt(<a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><V> factory)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Adapt a <code>PoolableObjectFactory</code> instance to work where a <code>KeyedPoolableObjectFactory</code> is
needed. The key is ignored.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - the <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><code>PoolableObjectFactory</code></a> to delegate to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool"><code>KeyedPoolableObjectFactory</code></a> that delegates to <code>factory</code> ignoring the key.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>factory</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="checkedPool-org.apache.commons.pool.KeyedObjectPool-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkedPool</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> checkedPool(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><V> type)</pre>
<div class="block">Wraps a <code>KeyedObjectPool</code> and dynamically checks the type of objects borrowed and returned to the keyedPool.
If an object is passed to the keyedPool that isn't of type <code>type</code> a <a href="/usr/share/doc/default-jdk-doc/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang"><code>ClassCastException</code></a> will be thrown.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the keyedPool to enforce type safety on</dd>
<dd><code>type</code> - the class type to enforce.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <code>KeyedObjectPool</code> that will only allow objects of <code>type</code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="checkedPool-org.apache.commons.pool.ObjectPool-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkedPool</h4>
<pre>public static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> checkedPool(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><T> type)</pre>
<div class="block">Wraps an <code>ObjectPool</code> and dynamically checks the type of objects borrowed and returned to the pool.
If an object is passed to the pool that isn't of type <code>type</code> a <a href="/usr/share/doc/default-jdk-doc/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang"><code>ClassCastException</code></a> will be thrown.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the pool to enforce type safety on</dd>
<dd><code>type</code> - the class type to enforce.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an <code>ObjectPool</code> that will only allow objects of <code>type</code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="checkMinIdle-org.apache.commons.pool.KeyedObjectPool-java.util.Collection-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkMinIdle</h4>
<pre>public static <K,V> <a href="/usr/share/doc/default-jdk-doc/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><K,<a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a>> checkMinIdle(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><? extends K> keys,
int minIdle,
long period)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Periodically check the idle object count for each key in the <code>Collection</code> <code>keys</code> in the keyedPool.
At most one idle object will be added per period.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the keyedPool to check periodically.</dd>
<dd><code>keys</code> - a collection of keys to check the idle object count.</dd>
<dd><code>minIdle</code> - if the <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html#getNumIdle-K-"><code>KeyedObjectPool.getNumIdle(Object)</code></a> is less than this then add an idle object.</dd>
<dd><code>period</code> - the frequency to check the number of idle objects in a keyedPool, see
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Timer.html?is-external=true#schedule-java.util.TimerTask-long-long-" title="class or interface in java.util"><code>Timer.schedule(TimerTask, long, long)</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="/usr/share/doc/default-jdk-doc/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> of key and <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util"><code>TimerTask</code></a> pairs that will periodically check the pools idle object count.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedPool</code>, <code>keys</code>, or any of the values in the
collection is <code>null</code> or when <code>minIdle</code> is negative or when <code>period</code> isn't
valid for <a href="/usr/share/doc/default-jdk-doc/api/java/util/Timer.html?is-external=true#schedule-java.util.TimerTask-long-long-" title="class or interface in java.util"><code>Timer.schedule(TimerTask, long, long)</code></a>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#checkMinIdle-org.apache.commons.pool.KeyedObjectPool-K-int-long-"><code>checkMinIdle(KeyedObjectPool, Object, int, long)</code></a></dd>
</dl>
</li>
</ul>
<a name="checkMinIdle-org.apache.commons.pool.KeyedObjectPool-java.lang.Object-int-long-">
<!-- -->
</a><a name="checkMinIdle-org.apache.commons.pool.KeyedObjectPool-K-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkMinIdle</h4>
<pre>public static <K,V> <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a> checkMinIdle(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
K key,
int minIdle,
long period)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Periodically check the idle object count for the key in the keyedPool. At most one idle object will be added per period.
If there is an exception when calling <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html#addObject-K-"><code>KeyedObjectPool.addObject(Object)</code></a> then no more checks for that key
will be performed.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the keyedPool to check periodically.</dd>
<dd><code>key</code> - the key to check the idle count of.</dd>
<dd><code>minIdle</code> - if the <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html#getNumIdle-K-"><code>KeyedObjectPool.getNumIdle(Object)</code></a> is less than this then add an idle object.</dd>
<dd><code>period</code> - the frequency to check the number of idle objects in a keyedPool, see
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Timer.html?is-external=true#schedule-java.util.TimerTask-long-long-" title="class or interface in java.util"><code>Timer.schedule(TimerTask, long, long)</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util"><code>TimerTask</code></a> that will periodically check the pools idle object count.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedPool</code>, <code>key</code> is <code>null</code> or
when <code>minIdle</code> is negative or when <code>period</code> isn't
valid for <a href="/usr/share/doc/default-jdk-doc/api/java/util/Timer.html?is-external=true#schedule-java.util.TimerTask-long-long-" title="class or interface in java.util"><code>Timer.schedule(TimerTask, long, long)</code></a>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="checkMinIdle-org.apache.commons.pool.ObjectPool-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkMinIdle</h4>
<pre>public static <T> <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a> checkMinIdle(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
int minIdle,
long period)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Periodically check the idle object count for the pool. At most one idle object will be added per period.
If there is an exception when calling <a href="../../../../org/apache/commons/pool/ObjectPool.html#addObject--"><code>ObjectPool.addObject()</code></a> then no more checks will be performed.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the pool to check periodically.</dd>
<dd><code>minIdle</code> - if the <a href="../../../../org/apache/commons/pool/ObjectPool.html#getNumIdle--"><code>ObjectPool.getNumIdle()</code></a> is less than this then add an idle object.</dd>
<dd><code>period</code> - the frequency to check the number of idle objects in a pool, see
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Timer.html?is-external=true#schedule-java.util.TimerTask-long-long-" title="class or interface in java.util"><code>Timer.schedule(TimerTask, long, long)</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="/usr/share/doc/default-jdk-doc/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util"><code>TimerTask</code></a> that will periodically check the pools idle object count.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>pool</code> is <code>null</code> or
when <code>minIdle</code> is negative or when <code>period</code> isn't
valid for <a href="/usr/share/doc/default-jdk-doc/api/java/util/Timer.html?is-external=true#schedule-java.util.TimerTask-long-long-" title="class or interface in java.util"><code>Timer.schedule(TimerTask, long, long)</code></a>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="checkRethrow-java.lang.Throwable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkRethrow</h4>
<pre>public static void checkRethrow(<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a> t)</pre>
<div class="block">Should the supplied Throwable be re-thrown (eg if it is an instance of
one of the Throwables that should never be swallowed). Used by the pool
error handling for operations that throw exceptions that normally need to
be ignored.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>t</code> - The Throwable to check</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/ThreadDeath.html?is-external=true" title="class or interface in java.lang">ThreadDeath</a></code> - if that is passed in</dd>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/VirtualMachineError.html?is-external=true" title="class or interface in java.lang">VirtualMachineError</a></code> - if that is passed in</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.5.5</dd>
</dl>
</li>
</ul>
<a name="erodingPool-org.apache.commons.pool.KeyedObjectPool-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erodingPool</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> erodingPool(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool)</pre>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
This is intended as an always thread-safe alternative to using an idle object evictor
provided by many pool implementations. This is also an effective way to shrink FIFO ordered
pools that experience load spikes.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the KeyedObjectPool to be decorated so it shrinks it's idle count when
possible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a pool that adaptively decreases it's size when idle objects are no longer needed.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.4</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-float-"><code>erodingPool(KeyedObjectPool, float)</code></a>,
<a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-float-boolean-"><code>erodingPool(KeyedObjectPool, float, boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="erodingPool-org.apache.commons.pool.KeyedObjectPool-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erodingPool</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> erodingPool(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
float factor)</pre>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
This is intended as an always thread-safe alternative to using an idle object evictor
provided by many pool implementations. This is also an effective way to shrink FIFO ordered
pools that experience load spikes.
<p>
The factor parameter provides a mechanism to tweak the rate at which the pool tries to shrink
it's size. Values between 0 and 1 cause the pool to try to shrink it's size more often.
Values greater than 1 cause the pool to less frequently try to shrink it's size.
</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the KeyedObjectPool to be decorated so it shrinks it's idle count when
possible.</dd>
<dd><code>factor</code> - a positive value to scale the rate at which the pool tries to reduce it's size.
If 0 < factor < 1 then the pool shrinks more aggressively.
If 1 < factor then the pool shrinks less aggressively.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a pool that adaptively decreases it's size when idle objects are no longer needed.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.4</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-float-boolean-"><code>erodingPool(KeyedObjectPool, float, boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="erodingPool-org.apache.commons.pool.KeyedObjectPool-float-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erodingPool</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> erodingPool(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
float factor,
boolean perKey)</pre>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
This is intended as an always thread-safe alternative to using an idle object evictor
provided by many pool implementations. This is also an effective way to shrink FIFO ordered
pools that experience load spikes.
<p>
The factor parameter provides a mechanism to tweak the rate at which the pool tries to shrink
it's size. Values between 0 and 1 cause the pool to try to shrink it's size more often.
Values greater than 1 cause the pool to less frequently try to shrink it's size.
</p>
<p>
The perKey parameter determines if the pool shrinks on a whole pool basis or a per key basis.
When perKey is false, the keys do not have an effect on the rate at which the pool tries to
shrink it's size. When perKey is true, each key is shrunk independently.
</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the KeyedObjectPool to be decorated so it shrinks it's idle count when
possible.</dd>
<dd><code>factor</code> - a positive value to scale the rate at which the pool tries to reduce it's size.
If 0 < factor < 1 then the pool shrinks more aggressively.
If 1 < factor then the pool shrinks less aggressively.</dd>
<dd><code>perKey</code> - when true, each key is treated independently.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a pool that adaptively decreases it's size when idle objects are no longer needed.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.4</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-"><code>erodingPool(KeyedObjectPool)</code></a>,
<a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.KeyedObjectPool-float-"><code>erodingPool(KeyedObjectPool, float)</code></a></dd>
</dl>
</li>
</ul>
<a name="erodingPool-org.apache.commons.pool.ObjectPool-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erodingPool</h4>
<pre>public static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> erodingPool(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool)</pre>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
This is intended as an always thread-safe alternative to using an idle object evictor
provided by many pool implementations. This is also an effective way to shrink FIFO ordered
pools that experience load spikes.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the ObjectPool to be decorated so it shrinks it's idle count when possible.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a pool that adaptively decreases it's size when idle objects are no longer needed.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.4</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.ObjectPool-float-"><code>erodingPool(ObjectPool, float)</code></a></dd>
</dl>
</li>
</ul>
<a name="erodingPool-org.apache.commons.pool.ObjectPool-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>erodingPool</h4>
<pre>public static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> erodingPool(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
float factor)</pre>
<div class="block">Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
This is intended as an always thread-safe alternative to using an idle object evictor
provided by many pool implementations. This is also an effective way to shrink FIFO ordered
pools that experience load spikes.
<p>
The factor parameter provides a mechanism to tweak the rate at which the pool tries to shrink
it's size. Values between 0 and 1 cause the pool to try to shrink it's size more often.
Values greater than 1 cause the pool to less frequently try to shrink it's size.
</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the ObjectPool to be decorated so it shrinks it's idle count when possible.</dd>
<dd><code>factor</code> - a positive value to scale the rate at which the pool tries to reduce it's size.
If 0 < factor < 1 then the pool shrinks more aggressively.
If 1 < factor then the pool shrinks less aggressively.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a pool that adaptively decreases it's size when idle objects are no longer needed.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.4</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#erodingPool-org.apache.commons.pool.ObjectPool-"><code>erodingPool(ObjectPool)</code></a></dd>
</dl>
</li>
</ul>
<a name="prefill-org.apache.commons.pool.KeyedObjectPool-java.util.Collection-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prefill</h4>
<pre>public static <K,V> void prefill(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
<a href="/usr/share/doc/default-jdk-doc/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><? extends K> keys,
int count)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a>,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Call <code>addObject(Object)</code> on <code>keyedPool</code> with each key in <code>keys</code> for
<code>count</code> number of times. This has the same effect as calling
<a href="../../../../org/apache/commons/pool/PoolUtils.html#prefill-org.apache.commons.pool.KeyedObjectPool-K-int-"><code>prefill(KeyedObjectPool, Object, int)</code></a> for each key in the <code>keys</code> collection.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the keyedPool to prefill.</dd>
<dd><code>keys</code> - <a href="/usr/share/doc/default-jdk-doc/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a> of keys to add objects for.</dd>
<dd><code>count</code> - the number of idle objects to add for each <code>key</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - when <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html#addObject-K-"><code>KeyedObjectPool.addObject(Object)</code></a> fails.</dd>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedPool</code>, <code>keys</code>, or
any value in <code>keys</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/commons/pool/PoolUtils.html#prefill-org.apache.commons.pool.KeyedObjectPool-K-int-"><code>prefill(KeyedObjectPool, Object, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="prefill-org.apache.commons.pool.KeyedObjectPool-java.lang.Object-int-">
<!-- -->
</a><a name="prefill-org.apache.commons.pool.KeyedObjectPool-K-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prefill</h4>
<pre>public static <K,V> void prefill(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool,
K key,
int count)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a>,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Call <code>addObject(Object)</code> on <code>keyedPool</code> with <code>key</code> <code>count</code>
number of times.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the keyedPool to prefill.</dd>
<dd><code>key</code> - the key to add objects for.</dd>
<dd><code>count</code> - the number of idle objects to add for <code>key</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - when <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html#addObject-K-"><code>KeyedObjectPool.addObject(Object)</code></a> fails.</dd>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>keyedPool</code> or <code>key</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="prefill-org.apache.commons.pool.ObjectPool-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prefill</h4>
<pre>public static <T> void prefill(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool,
int count)
throws <a href="/usr/share/doc/default-jdk-doc/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a>,
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Call <code>addObject()</code> on <code>pool</code> <code>count</code> number of times.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the pool to prefill.</dd>
<dd><code>count</code> - the number of idle objects to add.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - when <a href="../../../../org/apache/commons/pool/ObjectPool.html#addObject--"><code>ObjectPool.addObject()</code></a> fails.</dd>
<dd><code><a href="/usr/share/doc/default-jdk-doc/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - when <code>pool</code> is <code>null</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="synchronizedPool-org.apache.commons.pool.KeyedObjectPool-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>synchronizedPool</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> synchronizedPool(<a href="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</a><K,V> keyedPool)</pre>
<div class="block">Returns a synchronized (thread-safe) KeyedObjectPool backed by the specified KeyedObjectPool.
<p><b>Note:</b>
This should not be used on pool implementations that already provide proper synchronization
such as the pools provided in the Commons Pool library. Wrapping a pool that
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang"><code>waits</code></a> for poolable objects to be returned before allowing another one to be
borrowed with another layer of synchronization will cause liveliness issues or a deadlock.
</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedPool</code> - the KeyedObjectPool to be "wrapped" in a synchronized KeyedObjectPool.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a synchronized view of the specified KeyedObjectPool.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="synchronizedPool-org.apache.commons.pool.ObjectPool-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>synchronizedPool</h4>
<pre>public static <T> <a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> synchronizedPool(<a href="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</a><T> pool)</pre>
<div class="block">Returns a synchronized (thread-safe) ObjectPool backed by the specified ObjectPool.
<p><b>Note:</b>
This should not be used on pool implementations that already provide proper synchronization
such as the pools provided in the Commons Pool library. Wrapping a pool that
<a href="/usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang"><code>waits</code></a> for poolable objects to be returned before allowing another one to be
borrowed with another layer of synchronization will cause liveliness issues or a deadlock.
</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pool</code> - the ObjectPool to be "wrapped" in a synchronized ObjectPool.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a synchronized view of the specified ObjectPool.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="synchronizedPoolableFactory-org.apache.commons.pool.KeyedPoolableObjectFactory-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>synchronizedPoolableFactory</h4>
<pre>public static <K,V> <a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V> synchronizedPoolableFactory(<a href="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</a><K,V> keyedFactory)</pre>
<div class="block">Returns a synchronized (thread-safe) KeyedPoolableObjectFactory backed by the specified KeyedPoolableObjectFactory.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the type of key</dd>
<dd><code>V</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keyedFactory</code> - the KeyedPoolableObjectFactory to be "wrapped" in a synchronized KeyedPoolableObjectFactory.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a synchronized view of the specified KeyedPoolableObjectFactory.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
<a name="synchronizedPoolableFactory-org.apache.commons.pool.PoolableObjectFactory-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>synchronizedPoolableFactory</h4>
<pre>public static <T> <a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><T> synchronizedPoolableFactory(<a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</a><T> factory)</pre>
<div class="block">Returns a synchronized (thread-safe) PoolableObjectFactory backed by the specified PoolableObjectFactory.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of object</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - the PoolableObjectFactory to be "wrapped" in a synchronized PoolableObjectFactory.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a synchronized view of the specified PoolableObjectFactory.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Pool 1.3</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="../../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><span class="typeNameLink">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/pool/PoolUtils.html" target="_top">Frames</a></li>
<li><a href="PoolUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><small>Copyright © 2001-2012 Apache Software Foundation. Documenation generated July 7 2016</small>.</small></p>
</body>
</html>
|