Issue #7414 Deprecate QoSFilter setters (#7506)

* Issue #7414 Deprecate QoSFilter setters

Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
Jan Bartel 2022-02-08 14:27:33 +11:00 committed by GitHub
parent bdc60ee711
commit c742c2ef9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -293,10 +293,12 @@ public class QoSFilter implements Filter
* for the semaphore to become available before suspending a request.
*
* @param value wait time (in milliseconds)
* @deprecated use init-param waitMs instead
*/
@Deprecated
public void setWaitMs(long value)
{
_waitMs = value;
LOG.warn("Setter ignored: use waitMs init-param for QoSFilter");
}
/**
@ -316,10 +318,12 @@ public class QoSFilter implements Filter
* a request for while waiting for the semaphore to become available.
*
* @param value suspend time (in milliseconds)
* @deprecated use init-param suspendMs instead
*/
@Deprecated
public void setSuspendMs(long value)
{
_suspendMs = value;
LOG.warn("Setter ignored: use suspendMs init-param for QoSFilter");
}
/**
@ -339,11 +343,12 @@ public class QoSFilter implements Filter
* at the same time.
*
* @param value the number of requests
* @deprecated use init-param maxRequests instead
*/
@Deprecated
public void setMaxRequests(int value)
{
_passes = new Semaphore((value - getMaxRequests() + _passes.availablePermits()), true);
_maxRequests = value;
LOG.warn("Setter ignored: use maxRequests init-param for QoSFilter instead");
}
private class QoSAsyncListener implements AsyncListener