User: jules_gosnell
Date: 02/02/01 11:12:03
Modified: jetty/src/main/org/jboss/jetty/util
AbstractTimeOutManager.java
NaiveTimeOutManager.java
Log:
don't use sar in classpath - sun 1.3.0 doesn't like it
genericise AbstractTimeOutManager so we can reuse it for IntervalSnapshotStrategy
Revision Changes Path
1.3 +3 -8
contrib/jetty/src/main/org/jboss/jetty/util/AbstractTimeOutManager.java
Index: AbstractTimeOutManager.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/util/AbstractTimeOutManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractTimeOutManager.java 2002/01/13 21:30:14 1.2
+++ AbstractTimeOutManager.java 2002/02/01 19:12:03 1.3
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: AbstractTimeOutManager.java,v 1.2 2002/01/13 21:30:14 jules_gosnell Exp $
+// $Id: AbstractTimeOutManager.java,v 1.3 2002/02/01 19:12:03 jules_gosnell Exp $
//------------------------------------------------------------------------------
@@ -24,14 +24,9 @@
public void stop();
public interface
- TimeOutNotifier
+ TimeOutHelper
{
public void timeOut(Object object);
- }
-
- public interface
- TimeOutTester
- {
- public long timeRemaining(Object object, long now, long maxInactiveInterval);
+ public long timeRemaining(Object object, long timeRegistered, long timeNow,
long maxInactiveInterval);
}
}
1.5 +7 -8
contrib/jetty/src/main/org/jboss/jetty/util/NaiveTimeOutManager.java
Index: NaiveTimeOutManager.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/util/NaiveTimeOutManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NaiveTimeOutManager.java 2002/02/01 00:32:24 1.4
+++ NaiveTimeOutManager.java 2002/02/01 19:12:03 1.5
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: NaiveTimeOutManager.java,v 1.4 2002/02/01 00:32:24 jules_gosnell Exp $
+// $Id: NaiveTimeOutManager.java,v 1.5 2002/02/01 19:12:03 jules_gosnell Exp $
//------------------------------------------------------------------------------
@@ -26,15 +26,13 @@
{
final List _entries=new LinkedList();
final long _interval;
- final TimeOutNotifier _notifier;
- final TimeOutTester _tester;
+ final TimeOutHelper _helper;
public
- NaiveTimeOutManager(long interval, TimeOutNotifier notifier, TimeOutTester
tester)
+ NaiveTimeOutManager(long interval, TimeOutHelper helper)
{
_interval=interval;
- _notifier=notifier;
- _tester=tester;
+ _helper =helper;
}
class Entry
@@ -42,6 +40,7 @@
final Object _object;
final long _timeRegistered;
final long _maxInactiveInterval;
+
Entry(Object object, long timeRegistered, long maxInactiveInterval)
{
_object=object;
@@ -52,13 +51,13 @@
long
getTimeRemaining(long now)
{
- return _tester.timeRemaining(_object, now, _maxInactiveInterval);
+ return _helper.timeRemaining(_object, _timeRegistered, now,
_maxInactiveInterval);
}
void
timeOut()
{
- _notifier.timeOut(_object);
+ _helper.timeOut(_object);
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development