Class ConnectionPoolErrorHandler.CountingErrorHandler
- java.lang.Object
-
- io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.CountingErrorHandler
-
- All Implemented Interfaces:
ConnectionPoolErrorHandler
- Enclosing interface:
- ConnectionPoolErrorHandler
public static class ConnectionPoolErrorHandler.CountingErrorHandler extends Object implements ConnectionPoolErrorHandler
Counting error handler, this only propagates the state to the delegate handler after reaching a given limit.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler
ConnectionPoolErrorHandler.CountingErrorHandler, ConnectionPoolErrorHandler.SimpleConnectionPoolErrorHandler
-
-
Constructor Summary
Constructors Constructor Description CountingErrorHandler(int errorCount, int successCount, long interval)CountingErrorHandler(int errorCount, int successCount, long interval, ConnectionPoolErrorHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclearError()Clear the connection errors.booleanhandleError()Handle a connection error.booleanisAvailable()Check whether pool is available
-
-
-
Constructor Detail
-
CountingErrorHandler
public CountingErrorHandler(int errorCount, int successCount, long interval)
-
CountingErrorHandler
public CountingErrorHandler(int errorCount, int successCount, long interval, ConnectionPoolErrorHandler delegate)
-
-
Method Detail
-
isAvailable
public boolean isAvailable()
Description copied from interface:ConnectionPoolErrorHandlerCheck whether pool is available- Specified by:
isAvailablein interfaceConnectionPoolErrorHandler- Returns:
- whether the pool is available
-
handleError
public boolean handleError()
Description copied from interface:ConnectionPoolErrorHandlerHandle a connection error.- Specified by:
handleErrorin interfaceConnectionPoolErrorHandler- Returns:
trueif the pool is still available,falseotherwise
-
clearError
public boolean clearError()
Description copied from interface:ConnectionPoolErrorHandlerClear the connection errors.- Specified by:
clearErrorin interfaceConnectionPoolErrorHandler- Returns:
trueif the pool is available again,falseotherwise
-
-