Valve that triggers session replication across the cluster.
| 50 | * Valve that triggers session replication across the cluster. |
| 51 | */ |
| 52 | public class ReplicationValve extends ValveBase implements ClusterValve { |
| 53 | |
| 54 | private static final Log log = LogFactory.getLog(ReplicationValve.class); |
| 55 | |
| 56 | // ----------------------------------------------------- Instance Variables |
| 57 | |
| 58 | /** |
| 59 | * The StringManager for this package. |
| 60 | */ |
| 61 | protected static final StringManager sm = StringManager.getManager(Constants.Package); |
| 62 | |
| 63 | private CatalinaCluster cluster = null; |
| 64 | |
| 65 | /** |
| 66 | * Filter expression |
| 67 | */ |
| 68 | protected Pattern filter = null; |
| 69 | |
| 70 | /** |
| 71 | * crossContext session container |
| 72 | */ |
| 73 | protected final ThreadLocal<ArrayList<DeltaSession>> crossContextSessions = new ThreadLocal<>(); |
| 74 | |
| 75 | /** |
| 76 | * doProcessingStats (default = off) |
| 77 | */ |
| 78 | protected boolean doProcessingStats = false; |
| 79 | |
| 80 | /** |
| 81 | * Total request time in nanoseconds. |
| 82 | */ |
| 83 | protected LongAdder totalRequestTime = new LongAdder(); |
| 84 | /** |
| 85 | * Total send time in nanoseconds. |
| 86 | */ |
| 87 | protected LongAdder totalSendTime = new LongAdder(); |
| 88 | /** |
| 89 | * Total number of requests. |
| 90 | */ |
| 91 | protected AtomicLong lastSendTime = new AtomicLong(); |
| 92 | /** |
| 93 | * Number of requests filtered out. |
| 94 | */ |
| 95 | protected LongAdder nrOfFilterRequests = new LongAdder(); |
| 96 | /** |
| 97 | * Number of requests sent for replication. |
| 98 | */ |
| 99 | protected LongAdder nrOfSendRequests = new LongAdder(); |
| 100 | /** |
| 101 | * Number of cross-context requests sent for replication. |
| 102 | */ |
| 103 | protected LongAdder nrOfCrossContextSendRequests = new LongAdder(); |
| 104 | /** |
| 105 | * Number of requests. |
| 106 | */ |
| 107 | protected LongAdder nrOfRequests = new LongAdder(); |
| 108 | |
| 109 | /** |
nothing calls this directly
no test coverage detected