Home | History | Annotate | Download | only in collect

Lines Matching full:duration

257    * map once a fixed duration has passed since the entry's creation.
259 * @param duration the length of time after an entry is created that it
261 * @param unit the unit that {@code duration} is expressed in
262 * @throws IllegalArgumentException if {@code duration} is not positive
265 public MapMaker expiration(long duration, TimeUnit unit) {
270 if (duration <= 0) {
271 throw new IllegalArgumentException("invalid duration: " + duration);
273 this.expirationNanos = unit.toNanos(duration);