Top Inners Fields Constructors Methods
io.undertow.server.handlers.proxy.mod_cluster

pack-priv Class ModClusterContainer

extends Object
implements ModClusterController
Class Inheritance
All Implemented Interfaces
io.undertow.server.handlers.proxy.mod_cluster.ModClusterController
Imports
io.undertow.UndertowLogger, io.undertow.client.UndertowClient, io.undertow.server.HttpServerExchange, io.undertow.server.handlers.Cookie, io.undertow.server.handlers.cache.LRUCache, io.undertow.server.handlers.proxy.RouteIteratorFactory, .ProxyClient, io.undertow.util.CopyOnWriteMap, .Headers, .PathMatcher, io.undertow.connector.ByteBufferPool, org.xnio.OptionMap, .XnioExecutor, .XnioIoThread, org.xnio.ssl.XnioSsl, java.net.URI, java.util.ArrayList, .Collection, .Collections, .Iterator, .List, .Map, java.util.concurrent.ConcurrentMap, .TimeUnit

Authors
Stuart Douglas, Emanuel Muckenhuber, Radoslav Husar, Richard Opalka

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
pack-priv static class
private static class
private static class
pack-priv class

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<String, Balancer>
private final UndertowClient
private final OptionMap
private final LRUCache<String, String>
private final NodeHealthChecker
private final ConcurrentMap<XnioIoThread, ModClusterContainer.HealthCheckTask>
private final ConcurrentMap<String, VirtualHost>
private final ModCluster
private final ConcurrentMap<String, Node>
private final ProxyClient
private final long
private RouteIteratorFactory
private final ModClusterContainer.UpdateLoadTask
private final XnioSsl

Constructor Summary

AccessConstructor and Description
pack-priv
ModClusterContainer(final ModCluster modCluster, final XnioSsl xnioSsl, final UndertowClient client, OptionMap clientOptions)

Method Summary

Modifier and TypeMethod and Description
public synchronized boolean

Returns:

whether the node could be created or not
addNode
(final NodeConfig
the node configuration
config
,
final Balancer.BalancerBuilder
the balancer configuration
balancerConfig
,
final XnioIoThread
the associated I/O thread
ioThread
,
final ByteBufferPool
the buffer pool
bufferPool
)

Register a new node.

public synchronized boolean
disableContext(final String contextPath, final String jvmRoute, List<String> aliases)

public synchronized boolean

Returns:

whether the given node was disabled
disableNode
(final String
the jvmRoute
jvmRoute
)

Management command disabling all contexts on the given node.

pack-priv static Context
electNode(final Iterable<Context> contexts, final boolean existingSession, final String domain)

public synchronized boolean
enableContext(final String
the context path
contextPath
,
final String
the jvmRoute
jvmRoute
,
final List<String>
the virtual host aliases
aliases
)

Register a web context.

public synchronized boolean

Returns:

whether the given node was enabled
enableNode
(final String
the jvmRoute
jvmRoute
)

Management command enabling all contexts on the given node.

pack-priv Context

Returns:

the context, null if not found
findFailoverNode
(final VirtualHost.HostEntry
the resolved virtual host entry
entry
,
final String
the load balancing domain, if known
domain
,
final String
the actual value of JSESSIONID/jsessionid cookie/parameter
session
,
final String
the original jvmRoute; in case of multiple routes, the first one
jvmRoute
,
final boolean
whether sticky sessions are forced
forceStickySession
)

Try to find a failover node within the same load balancing group.

pack-priv Context

Returns:

the context, null if not found
findNewNode
(final VirtualHost.HostEntry
the resolved virtual host entry
entry
)

Find a new node handling this request.

public ModClusterProxyTarget

Returns:

proxy target
findTarget
(final HttpServerExchange
the http exchange
exchange
)

Get the mod_cluster proxy target.

pack-priv Collection<Balancer>
pack-priv UndertowClient
pack-priv OptionMap
pack-priv Node
getNode(final String jvmRoute)

pack-priv Collection<Node>
private Context
getOrRegisterContext(String contextPath, String jvmRoute, List<String> aliases, Node node)

public ProxyClient

Returns:

the proxy client
getProxyClient
()

Get the proxy client.

pack-priv String
public ModClusterStatus
pack-priv XnioSsl
private PathMatcher.PathMatch<VirtualHost.HostEntry>
mapVirtualHost(final HttpServerExchange
the http exchange
exchange
)

Map a request to virtual host.

private Iterator<CharSequence>
parseRoutes(String sessionId)

pack-priv synchronized boolean
removeContext(final String contextPath, final String jvmRoute, List<String> aliases)

public synchronized boolean
removeContext(final String contextPath, final Node node, List<String> aliases)

pack-priv void
removeHealthCheck(final Node node, XnioIoThread ioThread)

public synchronized Node

Returns:

the removed node
removeNode
(final String
the jvmRoute
jvmRoute
)

Remove a node.

protected void
removeNode(final Node node)

protected synchronized void
removeNode(final Node node, boolean onlyInError)

pack-priv static long
removeThreshold(final long healthChecks, final long removeBrokenNodes)

pack-priv void
scheduleHealthCheck(final Node node, XnioIoThread ioThread)

pack-priv synchronized int
stopContext(final String contextPath, final String jvmRoute, List<String> aliases)

public synchronized boolean

Returns:

whether the given node was stopped
stopNode
(final String
the jvmRoute
jvmRoute
)

Management command stopping all contexts on the given node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait