public interface IHALoadBalancerPolicy extends IHAPolicyLifeCycle
HALoadBalancerServlet,
HA Load Balancer| Modifier and Type | Method and Description |
|---|---|
String |
getLeaderURI(javax.servlet.http.HttpServletRequest req)
Return the Request-URI to which a non-idempotent request will be proxied.
|
String |
getReaderURI(javax.servlet.http.HttpServletRequest req)
Return the Request-URL to which a read-only request will
be proxied.
|
boolean |
service(boolean isLeaderRequest,
HALoadBalancerServlet servlet,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Invoked for each request.
|
destroy, initboolean service(boolean isLeaderRequest,
HALoadBalancerServlet servlet,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
HALoadBalancerServlet.isLeaderRequest - true iff this request must be directed to the
leaeder and false iff this request may be load
balanced over the joined services. UPDATEs MUST be handled by
the leader. Read requests can be handled by any service that
is joined with the met quorum.servlet - The HALoadBalancerServlet. This is exposed in order to
allow the IHALoadBalancerPolicy to perform a local
forward of the request.request - The request.response - The response.true iff the request was handled.javax.servlet.ServletExceptionIOExceptionString getLeaderURI(javax.servlet.http.HttpServletRequest req)
req - The request.null if we could not
find a service to which we could proxy this request.String getReaderURI(javax.servlet.http.HttpServletRequest req)
req - The request.null if we could not
find a service to which we could proxy this request.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.