Package com.levigo.jadice.server
Class TimeLimit
- java.lang.Object
-
- com.levigo.jadice.server.Limit
-
- com.levigo.jadice.server.TimeLimit
-
- All Implemented Interfaces:
Serializable
,Comparable<Limit>
public class TimeLimit extends Limit
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.levigo.jadice.server.Limit
Limit.WhenExceedAction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Limit other)
boolean
doesExceed(long count)
boolean
equals(Object o)
long
getTimeout()
int
hashCode()
String
toString()
-
Methods inherited from class com.levigo.jadice.server.Limit
getExceedAction, setExceedAction
-
-
-
-
Constructor Detail
-
TimeLimit
public TimeLimit(long maximumTime, TimeUnit unit)
Create a new TimeLimit.- Parameters:
maximumTime
- the value of the time limit (must be > 0)unit
- the unit of the time limit
-
-
Method Detail
-
getTimeout
public long getTimeout()
- Returns:
- The time limit in milliseconds
-
compareTo
public int compareTo(Limit other)
-
doesExceed
public boolean doesExceed(long count)
- Specified by:
doesExceed
in classLimit
-
-