BUG-413812

Mark RateTracker as Serializable to allow it to be stored in a Session that is
eventually persisted in a distributed memory platform.

Signed-off-by: David Harrigan <dharrigan@gmail.com>
This commit is contained in:
David Harrigan 2013-07-26 15:36:34 +01:00 committed by Jesse McConnell
parent 2be4ca5921
commit 192f2d7002
1 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.servlets; package org.eclipse.jetty.servlets;
import java.io.IOException; import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -1025,8 +1026,10 @@ public class DoSFilter implements Filter
* A RateTracker is associated with a connection, and stores request rate * A RateTracker is associated with a connection, and stores request rate
* data. * data.
*/ */
class RateTracker extends Timeout.Task implements HttpSessionBindingListener, HttpSessionActivationListener class RateTracker extends Timeout.Task implements HttpSessionBindingListener, HttpSessionActivationListener, Serializable
{ {
private static final long serialVersionUID = 3534663738034577872L;
transient protected final String _id; transient protected final String _id;
transient protected final int _type; transient protected final int _type;
transient protected final long[] _timestamps; transient protected final long[] _timestamps;