Skip to content

Commit

Permalink
Warn Pool extends GenericObjectPool #2521 (#2576)
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 authored Jul 12, 2021
1 parent 99020c1 commit 265b224
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/redis/clients/jedis/util/Pool.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public T getResource() {
}
}

/**
* @param resource
* @deprecated This will be removed in next major release. Use {@link #returnResource(java.lang.Object)}.
*/
@Deprecated
protected void returnResourceObject(final T resource) {
try {
internalPool.returnObject(resource);
Expand All @@ -109,6 +114,11 @@ public void destroy() {
closeInternalPool();
}

/**
* @param resource
* @deprecated This will be removed in next major release. Use {@link #returnBrokenResource(java.lang.Object)}.
*/
@Deprecated
protected void returnBrokenResourceObject(final T resource) {
try {
internalPool.invalidateObject(resource);
Expand All @@ -117,6 +127,10 @@ protected void returnBrokenResourceObject(final T resource) {
}
}

/**
* @deprecated This will be removed in next major release. Use {@link #destroy()}.
*/
@Deprecated
protected void closeInternalPool() {
try {
internalPool.close();
Expand Down

0 comments on commit 265b224

Please sign in to comment.