Top Description Inners Methods
io.undertow.server.handlers.proxy

public Interface ConnectionPoolErrorHandler

Known Direct Subinterfaces
io.undertow.server.handlers.proxy.ConnectionPoolManager
Known Direct Implementers
io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.SimpleConnectionPoolErrorHandler, io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.CountingErrorHandler

The connection pool error handler is intended to be used per node and will therefore be shared across I/O threads.
Author
Emanuel Muckenhuber

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ConnectionPoolErrorHandler.CountingErrorHandler

Counting error handler, this only propagates the state to the delegate handler after reaching a given limit.

public static class

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the pool is available again, false otherwise
clearError
()

Clear the connection errors.

public boolean

Returns:

true if the pool is still available, false otherwise
handleError
()

Handle a connection error.

public boolean

Returns:

whether the pool is available
isAvailable
()

Check whether pool is available

Method Detail

clearErrorback to summary
public boolean clearError()

Clear the connection errors.

Returns:boolean

true if the pool is available again, false otherwise

handleErrorback to summary
public boolean handleError()

Handle a connection error.

Returns:boolean

true if the pool is still available, false otherwise

isAvailableback to summary
public boolean isAvailable()

Check whether pool is available

Returns:boolean

whether the pool is available

io.undertow.server.handlers.proxy back to summary

public Class ConnectionPoolErrorHandler.CountingErrorHandler

extends Object
implements ConnectionPoolErrorHandler
Class Inheritance
  • java.lang.Object
  • io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.CountingErrorHandler
All Implemented Interfaces
io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler

Counting error handler, this only propagates the state to the delegate handler after reaching a given limit.

Field Summary

Modifier and TypeField and Description
private int
private final ConnectionPoolErrorHandler
private final int
private final long
private final int
private long

Constructor Summary

AccessConstructor and Description
public
CountingErrorHandler(int errorCount, int successCount, long interval)

public
CountingErrorHandler(int errorCount, int successCount, long interval, ConnectionPoolErrorHandler delegate)

Method Summary

Modifier and TypeMethod and Description
public synchronized boolean
public synchronized boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private int count
delegateback to summary
private final ConnectionPoolErrorHandler delegate
errorCountback to summary
private final int errorCount
intervalback to summary
private final long interval
successCountback to summary
private final int successCount
timeoutback to summary
private long timeout

Constructor Detail

CountingErrorHandlerback to summary
public CountingErrorHandler(int errorCount, int successCount, long interval)
CountingErrorHandlerback to summary
public CountingErrorHandler(int errorCount, int successCount, long interval, ConnectionPoolErrorHandler delegate)

Method Detail

clearErrorback to summary
public synchronized boolean clearError()

Implements io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.clearError.

Doc from io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.clearError.

Clear the connection errors.

Returns:boolean

true if the pool is available again, false otherwise

Annotations
@Override
handleErrorback to summary
public synchronized boolean handleError()

Implements io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.handleError.

Doc from io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.handleError.

Handle a connection error.

Returns:boolean

true if the pool is still available, false otherwise

Annotations
@Override
isAvailableback to summary
public boolean isAvailable()

Implements io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.isAvailable.

Doc from io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.isAvailable.

Check whether pool is available

Returns:boolean

whether the pool is available

Annotations
@Override
io.undertow.server.handlers.proxy back to summary

public Class ConnectionPoolErrorHandler.SimpleConnectionPoolErrorHandler

extends Object
implements ConnectionPoolErrorHandler
Class Inheritance
  • java.lang.Object
  • io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.SimpleConnectionPoolErrorHandler
All Implemented Interfaces
io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler
Known Direct Subclasses
io.undertow.server.handlers.proxy.LoadBalancingProxyClient.Host

Field Summary

Modifier and TypeField and Description
private volatile boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

problemback to summary
private volatile boolean problem

Constructor Detail

SimpleConnectionPoolErrorHandlerback to summary
public SimpleConnectionPoolErrorHandler()

Method Detail

clearErrorback to summary
public boolean clearError()

Implements io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.clearError.

Doc from io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.clearError.

Clear the connection errors.

Returns:boolean

true if the pool is available again, false otherwise

Annotations
@Override
handleErrorback to summary
public boolean handleError()

Implements io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.handleError.

Doc from io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.handleError.

Handle a connection error.

Returns:boolean

true if the pool is still available, false otherwise

Annotations
@Override
isAvailableback to summary
public boolean isAvailable()

Implements io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.isAvailable.

Doc from io.undertow.server.handlers.proxy.ConnectionPoolErrorHandler.isAvailable.

Check whether pool is available

Returns:boolean

whether the pool is available

Annotations
@Override