| java.lang.Object org.apache.catalina.valves.ValveBase org.apache.catalina.ha.tcp.ReplicationValve
ReplicationValve | public class ReplicationValve extends ValveBase implements ClusterValve(Code) | | Implementation of a Valve that logs interesting contents from the
specified Request (before processing) and the corresponding Response
(after processing). It is especially useful in debugging problems
related to headers and cookies.
This Valve may be attached to any Container, depending on the granularity
of the logging you wish to perform.
primaryIndicator=true, then the request attribute org.apache.catalina.ha.tcp.isPrimarySession.
is set true, when request processing is at sessions primary node.
author: Craig R. McClanahan author: Filip Hanik author: Peter Rossbach version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Method Summary | |
protected void | createPrimaryIndicator(Request request) | public boolean | doStatistics() | public CatalinaCluster | getCluster() | public String | getFilter() | public String | getInfo() Return descriptive information about this Valve implementation. | public long | getLastSendTime() | public long | getNrOfCrossContextSendRequests() | public long | getNrOfFilterRequests() | public long | getNrOfRequests() | public long | getNrOfSendRequests() | public String | getPrimaryIndicatorName() | protected java.util.regex.Pattern[] | getReqFilters() | public long | getTotalRequestTime() | public long | getTotalSendTime() | public void | invoke(Request request, Response response) Log the interesting request parameters, invoke the next Valve in the
sequence, and log the interesting response parameters. | public boolean | isPrimaryIndicator() | protected boolean | isRequestWithoutSessionChange(String uri) | public void | registerReplicationSession(DeltaSession session) Register all cross context sessions inside endAccess. | protected void | resetDeltaRequest(Session session) | protected void | resetReplicationRequest(Request request, boolean isCrossContext) | public void | resetStatistics() | protected void | send(ClusterManager manager, CatalinaCluster cluster, String sessionId) | protected void | sendCrossContextSession(CatalinaCluster containerCluster) | protected void | sendInvalidSessions(ClusterManager manager, CatalinaCluster cluster) | protected void | sendMessage(Session session, ClusterManager manager, CatalinaCluster cluster) | protected void | sendReplicationMessage(Request request, long totalstart, boolean isCrossContext, ClusterManager clusterManager, CatalinaCluster containerCluster) | protected void | sendSessionReplicationMessage(Request request, ClusterManager manager, CatalinaCluster cluster) | public void | setCluster(CatalinaCluster cluster) | public void | setFilter(String filter) | public void | setPrimaryIndicator(boolean primaryIndicator) | public void | setPrimaryIndicatorName(String primaryIndicatorName) | protected void | setReqFilters(java.util.regex.Pattern[] reqFilters) | public void | setStatistics(boolean doProcessingStats) | public String | toString() Return a String rendering of this object. | protected void | updateStats(long requestTime, long clusterTime) |
crossContextSessions | protected ThreadLocal crossContextSessions(Code) | | crossContext session container
|
doProcessingStats | protected boolean doProcessingStats(Code) | | doProcessingStats (default = off)
|
lastSendTime | protected long lastSendTime(Code) | | |
nrOfCrossContextSendRequests | protected long nrOfCrossContextSendRequests(Code) | | |
nrOfFilterRequests | protected long nrOfFilterRequests(Code) | | |
nrOfRequests | protected long nrOfRequests(Code) | | |
nrOfSendRequests | protected long nrOfSendRequests(Code) | | |
primaryIndicator | protected boolean primaryIndicator(Code) | | must primary change indicator set
|
primaryIndicatorName | protected String primaryIndicatorName(Code) | | Name of primary change indicator as request attribute
|
totalRequestTime | protected long totalRequestTime(Code) | | |
totalSendTime | protected long totalSendTime(Code) | | |
ReplicationValve | public ReplicationValve()(Code) | | |
createPrimaryIndicator | protected void createPrimaryIndicator(Request request) throws IOException(Code) | | Mark Request that processed at primary node with attribute
primaryIndicatorName
Parameters: request - throws: IOException - |
doStatistics | public boolean doStatistics()(Code) | | Calc processing stats
|
getInfo | public String getInfo()(Code) | | Return descriptive information about this Valve implementation.
|
getLastSendTime | public long getLastSendTime()(Code) | | Returns the lastSendTime. |
getNrOfCrossContextSendRequests | public long getNrOfCrossContextSendRequests()(Code) | | Returns the nrOfCrossContextSendRequests. |
getNrOfFilterRequests | public long getNrOfFilterRequests()(Code) | | Returns the nrOfFilterRequests. |
getNrOfRequests | public long getNrOfRequests()(Code) | | Returns the nrOfRequests. |
getNrOfSendRequests | public long getNrOfSendRequests()(Code) | | Returns the nrOfSendRequests. |
getPrimaryIndicatorName | public String getPrimaryIndicatorName()(Code) | | Returns the primaryIndicatorName. |
getTotalRequestTime | public long getTotalRequestTime()(Code) | | Returns the totalRequestTime. |
getTotalSendTime | public long getTotalSendTime()(Code) | | Returns the totalSendTime. |
invoke | public void invoke(Request request, Response response) throws IOException, ServletException(Code) | | Log the interesting request parameters, invoke the next Valve in the
sequence, and log the interesting response parameters.
Parameters: request - The servlet request to be processed Parameters: response - The servlet response to be created exception: IOException - if an input/output error occurs exception: ServletException - if a servlet error occurs |
isPrimaryIndicator | public boolean isPrimaryIndicator()(Code) | | Returns the primaryIndicator. |
isRequestWithoutSessionChange | protected boolean isRequestWithoutSessionChange(String uri)(Code) | | is request without possible session change
Parameters: uri - The request uri True if no session change |
registerReplicationSession | public void registerReplicationSession(DeltaSession session)(Code) | | Register all cross context sessions inside endAccess.
Use a list with contains check, that the Portlet API can include a lot of fragments from same or
different applications with session changes.
Parameters: session - cross context session |
resetDeltaRequest | protected void resetDeltaRequest(Session session)(Code) | | Reset DeltaRequest from session
Parameters: session - HttpSession from current request or cross context session |
resetReplicationRequest | protected void resetReplicationRequest(Request request, boolean isCrossContext)(Code) | | Fix memory leak for long sessions with many changes, when no backup member exists!
Parameters: request - current request after responce is generated Parameters: isCrossContext - check crosscontext threadlocal |
resetStatistics | public void resetStatistics()(Code) | | reset the active statitics
|
sendCrossContextSession | protected void sendCrossContextSession(CatalinaCluster containerCluster)(Code) | | Send all changed cross context sessions to backups
Parameters: containerCluster - |
sendInvalidSessions | protected void sendInvalidSessions(ClusterManager manager, CatalinaCluster cluster)(Code) | | check for session invalidations
Parameters: manager - Parameters: cluster - |
sendMessage | protected void sendMessage(Session session, ClusterManager manager, CatalinaCluster cluster)(Code) | | Send message delta message from request session
Parameters: request - current request Parameters: manager - session manager Parameters: cluster - replication cluster |
sendReplicationMessage | protected void sendReplicationMessage(Request request, long totalstart, boolean isCrossContext, ClusterManager clusterManager, CatalinaCluster containerCluster)(Code) | | Parameters: request - Parameters: totalstart - Parameters: isCrossContext - Parameters: clusterManager - Parameters: containerCluster - |
sendSessionReplicationMessage | protected void sendSessionReplicationMessage(Request request, ClusterManager manager, CatalinaCluster cluster)(Code) | | Send Cluster Replication Request
Parameters: request - current request Parameters: manager - session manager Parameters: cluster - replication cluster |
setPrimaryIndicator | public void setPrimaryIndicator(boolean primaryIndicator)(Code) | | Parameters: primaryIndicator - The primaryIndicator to set. |
setPrimaryIndicatorName | public void setPrimaryIndicatorName(String primaryIndicatorName)(Code) | | Parameters: primaryIndicatorName - The primaryIndicatorName to set. |
toString | public String toString()(Code) | | Return a String rendering of this object.
|
updateStats | protected void updateStats(long requestTime, long clusterTime)(Code) | | protocol cluster replications stats
Parameters: requestTime - Parameters: clusterTime - |
|
|