/libcore/ojluni/src/main/java/java/util/concurrent/ |
H A D | CyclicBarrier.java | 418 * @param unit the time unit of the timeout parameter 432 public int await(long timeout, TimeUnit unit) argument 436 return dowait(true, unit.toNanos(timeout));
|
H A D | ExecutorCompletionService.java | 202 public Future<V> poll(long timeout, TimeUnit unit) argument 204 return completionQueue.poll(timeout, unit);
|
H A D | AbstractExecutorService.java | 228 long timeout, TimeUnit unit) 230 return doInvokeAny(tasks, true, unit.toNanos(timeout)); 260 long timeout, TimeUnit unit) 264 final long nanos = unit.toNanos(timeout); 227 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument 259 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
|
H A D | DelayQueue.java | 174 * @param unit This parameter is ignored as the method never blocks 178 public boolean offer(E e, long timeout, TimeUnit unit) { argument 253 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument 254 long nanos = unit.toNanos(timeout);
|
H A D | FutureTask.java | 199 public V get(long timeout, TimeUnit unit) argument 201 if (unit == null) 205 (s = awaitDone(true, unit.toNanos(timeout))) <= COMPLETING)
|
H A D | LinkedBlockingDeque.java | 406 public boolean offerFirst(E e, long timeout, TimeUnit unit) argument 410 long nanos = unit.toNanos(timeout); 429 public boolean offerLast(E e, long timeout, TimeUnit unit) argument 433 long nanos = unit.toNanos(timeout); 512 public E pollFirst(long timeout, TimeUnit unit) argument 514 long nanos = unit.toNanos(timeout); 530 public E pollLast(long timeout, TimeUnit unit) argument 532 long nanos = unit.toNanos(timeout); 656 public boolean offer(E e, long timeout, TimeUnit unit) argument 658 return offerLast(e, timeout, unit); 683 poll(long timeout, TimeUnit unit) argument [all...] |
H A D | CompletableFuture.java | 1929 * @param unit the time unit of the timeout argument 1937 public T get(long timeout, TimeUnit unit) argument 1940 long nanos = unit.toNanos(timeout); 2514 * with a TimeoutException, in units of {@code unit} 2515 * @param unit a {@code TimeUnit} determining how to interpret the 2522 public CompletableFuture<T> orTimeout(long timeout, TimeUnit unit) { argument 2523 if (unit == null) 2527 timeout, unit))); 2537 * with the given value, in units of {@code unit} 2545 completeOnTimeout(T value, long timeout, TimeUnit unit) argument 2571 delayedExecutor(long delay, TimeUnit unit, Executor executor) argument 2592 delayedExecutor(long delay, TimeUnit unit) argument 2652 delay(Runnable command, long delay, TimeUnit unit) argument 2678 final TimeUnit unit; field in class:CompletableFuture.DelayedExecutor 2680 DelayedExecutor(long delay, TimeUnit unit, Executor executor) argument 2740 get(long timeout, TimeUnit unit) argument 2770 orTimeout(long timeout, TimeUnit unit) argument 2773 completeOnTimeout(T value, long timeout, TimeUnit unit) argument [all...] |
H A D | ArrayBlockingQueue.java | 352 public boolean offer(E e, long timeout, TimeUnit unit) argument 356 long nanos = unit.toNanos(timeout); 394 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument 395 long nanos = unit.toNanos(timeout);
|
H A D | LinkedBlockingQueue.java | 372 public boolean offer(E e, long timeout, TimeUnit unit) argument 376 long nanos = unit.toNanos(timeout); 456 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument 459 long nanos = unit.toNanos(timeout);
|
H A D | SynchronousQueue.java | 888 public boolean offer(E e, long timeout, TimeUnit unit) argument 891 if (transferer.transfer(e, true, unit.toNanos(timeout)) != null) 936 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument 937 E e = transferer.transfer(null, true, unit.toNanos(timeout));
|
/libcore/ojluni/src/main/java/java/time/ |
H A D | LocalDate.java | 510 * Checks if the specified unit is supported. 512 * This checks if the specified unit can be added to, or subtracted from, this date. 516 * If the unit is a {@link ChronoUnit} then the query is implemented here. 530 * If the unit is not a {@code ChronoUnit}, then the result of this method 533 * Whether the unit is supported is determined by the unit. 535 * @param unit the unit to check, null returns false 536 * @return true if the unit can be added/subtracted, false if not 539 public boolean isSupported(TemporalUnit unit) { argument 1228 plus(long amountToAdd, TemporalUnit unit) argument 1399 minus(long amountToSubtract, TemporalUnit unit) argument 1595 until(Temporal endExclusive, TemporalUnit unit) argument [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | AsynchronousChannelGroupImpl.java | 200 final Future<?> schedule(Runnable task, long timeout, TimeUnit unit) { argument 202 return timeoutExecutor.schedule(task, timeout, unit); 306 public final boolean awaitTermination(long timeout, TimeUnit unit) argument 309 return pool.executor().awaitTermination(timeout, unit);
|
H A D | PendingFuture.java | 191 public V get(long timeout, TimeUnit unit) argument 197 if (!latch.await(timeout, unit)) throw new TimeoutException();
|
H A D | UnixAsynchronousSocketChannelImpl.java | 499 TimeUnit unit, 553 this.readTimer = port.schedule(readTimeoutTask, timeout, unit); 694 TimeUnit unit, 736 this.writeTimer = port.schedule(writeTimeoutTask, timeout, unit); 495 implRead(boolean isScatteringRead, ByteBuffer dst, ByteBuffer[] dsts, long timeout, TimeUnit unit, A attachment, CompletionHandler<V,? super A> handler) argument 690 implWrite(boolean isGatheringWrite, ByteBuffer src, ByteBuffer[] srcs, long timeout, TimeUnit unit, A attachment, CompletionHandler<V,? super A> handler) argument
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | ChronoPeriodImpl.java | 141 public long get(TemporalUnit unit) { argument 142 if (unit == ChronoUnit.YEARS) { 144 } else if (unit == ChronoUnit.MONTHS) { 146 } else if (unit == ChronoUnit.DAYS) { 149 throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
|
H A D | MinguoDate.java | 386 public MinguoDate plus(long amountToAdd, TemporalUnit unit) { argument 387 return super.plus(amountToAdd, unit); 391 public MinguoDate minus(long amountToAdd, TemporalUnit unit) { argument 392 return super.minus(amountToAdd, unit);
|
H A D | ThaiBuddhistDate.java | 386 public ThaiBuddhistDate plus(long amountToAdd, TemporalUnit unit) { argument 387 return super.plus(amountToAdd, unit); 391 public ThaiBuddhistDate minus(long amountToAdd, TemporalUnit unit) { argument 392 return super.minus(amountToAdd, unit);
|
H A D | HijrahDate.java | 551 public HijrahDate plus(long amountToAdd, TemporalUnit unit) { argument 552 return super.plus(amountToAdd, unit); 556 public HijrahDate minus(long amountToSubtract, TemporalUnit unit) { argument 557 return super.minus(amountToSubtract, unit);
|
H A D | JapaneseDate.java | 631 public JapaneseDate plus(long amountToAdd, TemporalUnit unit) { argument 632 return super.plus(amountToAdd, unit); 636 public JapaneseDate minus(long amountToAdd, TemporalUnit unit) { argument 637 return super.minus(amountToAdd, unit);
|
/libcore/ojluni/src/main/java/java/util/concurrent/locks/ |
H A D | ReentrantLock.java | 384 * lock.tryLock(timeout, unit)) { 433 * @param unit the time unit of the timeout argument 439 * @throws NullPointerException if the time unit is null 441 public boolean tryLock(long timeout, TimeUnit unit) argument 443 return sync.tryAcquireNanos(1, unit.toNanos(timeout));
|
H A D | ReentrantReadWriteLock.java | 822 * lock.tryLock(timeout, unit)) { 866 * @param unit the time unit of the timeout argument 869 * @throws NullPointerException if the time unit is null 871 public boolean tryLock(long timeout, TimeUnit unit) argument 873 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); 1059 * lock.tryLock(timeout, unit)) { 1110 * @param unit the time unit of the timeout argument 1118 * @throws NullPointerException if the time unit i 1120 tryLock(long timeout, TimeUnit unit) argument [all...] |
H A D | StampedLock.java | 373 * @param unit the time unit of the {@code time} argument 379 public long tryWriteLock(long time, TimeUnit unit) argument 381 long nanos = unit.toNanos(time); 454 * @param unit the time unit of the {@code time} argument 460 public long tryReadLock(long time, TimeUnit unit) argument 463 long nanos = unit.toNanos(time); 885 public boolean tryLock(long time, TimeUnit unit) argument 887 return tryReadLock(time, unit) ! 901 tryLock(long time, TimeUnit unit) argument [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | TCKPeriod.java | 168 public long get(TemporalUnit unit) { 169 if (unit == YEARS) { 198 public long get(TemporalUnit unit) { 221 public long get(TemporalUnit unit) { 222 if (unit == DAYS) { 647 public long get(TemporalUnit unit) { 648 if (unit == DAYS) { 792 public long get(TemporalUnit unit) { 793 if (unit == DAYS) { 1156 public void test_good_getUnit(long amount, TemporalUnit unit) { argument 1175 test_bad_getUnit(TemporalUnit unit) argument [all...] |
H A D | TCKYear.java | 600 public void test_plus_long_TemporalUnit(Year base, long amount, TemporalUnit unit, Year expectedYear, Class<?> expectedEx) { argument 602 assertEquals(base.plus(amount, unit), expectedYear); 605 base.plus(amount, unit); 732 public void test_minus_long_TemporalUnit(Year base, long amount, TemporalUnit unit, Year expectedYear, Class<?> expectedEx) { argument 734 assertEquals(base.minus(amount, unit), expectedYear); 737 Year result = base.minus(amount, unit); 925 public void test_until_TemporalUnit(Year year1, Year year2, TemporalUnit unit, long expected) { argument 926 long amount = year1.until(year2, unit); 931 public void test_until_TemporalUnit_negated(Year year1, Year year2, TemporalUnit unit, long expected) { argument 932 long amount = year2.until(year1, unit); 937 test_until_TemporalUnit_between(Year year1, Year year2, TemporalUnit unit, long expected) argument [all...] |
H A D | TCKYearMonth.java | 775 public void test_plus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { argument 777 assertEquals(base.plus(amount, unit), expectedYearMonth); 780 YearMonth result = base.plus(amount, unit); 990 public void test_minus_long_TemporalUnit(YearMonth base, long amount, TemporalUnit unit, YearMonth expectedYearMonth, Class<?> expectedEx) { argument 992 assertEquals(base.minus(amount, unit), expectedYearMonth); 995 YearMonth result = base.minus(amount, unit); 1249 public void test_until_TemporalUnit(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) { argument 1250 long amount = ym1.until(ym2, unit); 1255 public void test_until_TemporalUnit_negated(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) { argument 1256 long amount = ym2.until(ym1, unit); 1261 test_until_TemporalUnit_between(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) argument [all...] |