|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.cache.Configuration.Duration
public static class Configuration.Duration
A time duration.
Field Summary | |
---|---|
static Configuration.Duration |
ETERNAL
ETERNAL (forever). |
static Configuration.Duration |
ZERO
ZERO (no time). |
Constructor Summary | |
---|---|
Configuration.Duration(long startTime,
long endTime)
Constructs a Configuration.Duration based on the duration between two
specified points in time (since the Epoc), messured in milliseconds. |
|
Configuration.Duration(TimeUnit timeUnit,
long durationAmount)
Constructs a duration. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
long |
getAdjustedTime(long time)
Calculates the adjusted time (from the Epoc) given a specified time (to be adjusted) by the duration. |
long |
getDurationAmount()
|
TimeUnit |
getTimeUnit()
|
int |
hashCode()
|
boolean |
isEternal()
Determines if a Configuration.Duration is eternal (forever). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Configuration.Duration ETERNAL
public static final Configuration.Duration ZERO
Constructor Detail |
---|
public Configuration.Duration(TimeUnit timeUnit, long durationAmount)
timeUnit
- the unit of time to specify time in. The minimum time unit is milliseconds.durationAmount
- how long, in the specified units, the cache entries should live. 0 means eternal.
NullPointerException
- if timeUnit is null
IllegalArgumentException
- if durationAmount is less than 0 or a TimeUnit less than milliseconds is specifiedpublic Configuration.Duration(long startTime, long endTime)
Configuration.Duration
based on the duration between two
specified points in time (since the Epoc), messured in milliseconds.
startTime
- the start time (since the Epoc)endTime
- the end time (since the Epoc)Method Detail |
---|
public TimeUnit getTimeUnit()
public long getDurationAmount()
public boolean isEternal()
Configuration.Duration
is eternal (forever).
Configuration.Duration
is eternalpublic long getAdjustedTime(long time)
time
- the time from which to adjust given the duration
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |