421eb12228
This commit seeks to reduce the number of idle connections to redis that our code uses by making clients share thread-safe connection pools (which is the point of a connection pool). This only changes utility methods to generate and access jedis pools, and does not seek to address any issues relating to the use of the connections that may or may not be causing problems. The changes are as follows: 1. Add a static cache of all connection pools - Each connection pool is distinguished by its ip and port. Two requested connections to the same ip:port combinations will use the same connection pool. 2. Increase the max size of each pool to 20 - Overall, by having fewer idle connections, this commit should still end up with fewer connections going at any given time. 3. Make explicit setting to block while waiting for a connection - This should already be the default, but it is made explicit just in case. |
||
---|---|---|
.. | ||
.externalToolBuilders | ||
src/mineplex/serverdata | ||
.classpath | ||
.project | ||
build.xml | ||
Mineplex.ServerData.iml |