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
ConstructorsConstructorDescriptionCountingErrorHandler
(int errorCount, int successCount, long interval) CountingErrorHandler
(int errorCount, int successCount, long interval, ConnectionPoolErrorHandler delegate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Clear the connection errors.boolean
Handle a connection error.boolean
Check whether pool is available
-
Constructor Details
-
CountingErrorHandler
public CountingErrorHandler(int errorCount, int successCount, long interval) -
CountingErrorHandler
public CountingErrorHandler(int errorCount, int successCount, long interval, ConnectionPoolErrorHandler delegate)
-
-
Method Details
-
isAvailable
public boolean isAvailable()Description copied from interface:ConnectionPoolErrorHandler
Check whether pool is available- Specified by:
isAvailable
in interfaceConnectionPoolErrorHandler
- Returns:
- whether the pool is available
-
handleError
public boolean handleError()Description copied from interface:ConnectionPoolErrorHandler
Handle a connection error.- Specified by:
handleError
in interfaceConnectionPoolErrorHandler
- Returns:
true
if the pool is still available,false
otherwise
-
clearError
public boolean clearError()Description copied from interface:ConnectionPoolErrorHandler
Clear the connection errors.- Specified by:
clearError
in interfaceConnectionPoolErrorHandler
- Returns:
true
if the pool is available again,false
otherwise
-