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 boolean
clearError()
Clear the connection errors.boolean
handleError()
Handle a connection error.boolean
isAvailable()
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: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
-
-