Skip to content

Commit

Permalink
Update README, minor code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettwooldridge committed Nov 22, 2024
1 parent 8dd2535 commit f54241b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,22 @@ Please read the [Rapid Recovery Guide](https://github.com/brettwooldridge/Hikari

----------------------------------------------------

### :see_no_evil: Secret Properties

HikariCP has several Java system properties that control various aspects of the pool. These properties are *completely unsupported*
for user manipulation. It is possible though unlikely that they may not exist in the future. This means: do not even think of opening
an issue of any kind if you have modified these properties. You have been warned. *In fact, pretend you never heard anything about
"secret properties".*

| Property | Description |
|:----------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``com.zaxxer.hikari.blockUntilFilled`` | When this property is set ``true`` *and* ``initializationFailTimeout`` is greater than 1, the pool will block during start until completely filled. |
| ``com.zaxxer.hikari.enableRequestBoundaries`` | When this property is set ``true``, HikariCP will bracket connection acquisition and return with calls to ``Connection.beginRequest()`` and ``Connection.endRequest()``. |
| ``com.zaxxer.hikari.housekeeping.period`` | This property controls the frequency of the housekeeping thread, represented in milliseconds. Really, don't mess with this. |
| ``com.zaxxer.hikari.useWeakReferences`` | When this property is set ``true`` it will force HikariCP to use ``WeakReference`` objects in the ``ConcurrentBag`` internal collection ThreadLocals and prevent the use of our ``FastList`` class, all to avoid TomCat warnings during redeploy. |

Seriously, either don't use these properties or take on full responsibility for the consequences.

### :rocket: Initialization

You can use the ``HikariConfig`` class like so<sup>1</sup>:
Expand Down Expand Up @@ -547,7 +563,7 @@ Don't forget the [Wiki](https://github.com/brettwooldridge/HikariCP/wiki) for ad

### Requirements

&#8658; Java 8+ (Java 6/7 artifacts are in maintenance mode)<br/>
&#8658; Java 11+ (Java 6/7/8 artifacts are in maintenance mode)<br/>
&#8658; slf4j library<br/>

### Sponsors
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/zaxxer/hikari/pool/HikariPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ public HikariPool(final HikariConfig config)
ThreadFactory threadFactory = config.getThreadFactory();

final int maxPoolSize = config.getMaximumPoolSize();
LinkedBlockingQueue<Runnable> addConnectionQueue = new LinkedBlockingQueue<>(maxPoolSize);
this.addConnectionExecutor = createThreadPoolExecutor(addConnectionQueue, poolName + ":connection-adder", threadFactory, new CustomDiscardPolicy());
this.addConnectionExecutor = createThreadPoolExecutor(maxPoolSize, poolName + ":connection-adder", threadFactory, new CustomDiscardPolicy());
this.closeConnectionExecutor = createThreadPoolExecutor(maxPoolSize, poolName + ":connection-closer", threadFactory, new ThreadPoolExecutor.CallerRunsPolicy());

this.leakTaskFactory = new ProxyLeakTaskFactory(config.getLeakDetectionThreshold(), houseKeepingExecutorService);
Expand Down

0 comments on commit f54241b

Please sign in to comment.