Searched refs:timeout (Results 1 - 25 of 53) sorted by relevance

123

/libcore/luni/src/main/java/java/util/concurrent/
H A DBlockingDeque.java275 * @param timeout how long to wait before giving up, in units of
278 * {@code timeout} parameter
288 boolean offerFirst(E e, long timeout, TimeUnit unit) argument
297 * @param timeout how long to wait before giving up, in units of
300 * {@code timeout} parameter
310 boolean offerLast(E e, long timeout, TimeUnit unit) argument
336 * @param timeout how long to wait before giving up, in units of
339 * {@code timeout} parameter
344 E pollFirst(long timeout, TimeUnit unit) argument
352 * @param timeout ho
360 pollLast(long timeout, TimeUnit unit) argument
477 offer(E e, long timeout, TimeUnit unit) argument
528 poll(long timeout, TimeUnit unit) argument
[all...]
H A DBlockingQueue.java210 * @param timeout how long to wait before giving up, in units of
213 * {@code timeout} parameter
223 boolean offer(E e, long timeout, TimeUnit unit) argument
239 * @param timeout how long to wait before giving up, in units of
242 * {@code timeout} parameter
247 E poll(long timeout, TimeUnit unit) argument
H A DCompletionService.java85 * @param timeout how long to wait before giving up, in units of
88 * {@code timeout} parameter
94 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; argument
H A DFuture.java128 * @param timeout the maximum time to wait
129 * @param unit the time unit of the timeout argument
138 V get(long timeout, TimeUnit unit) argument
H A DTransferQueue.java81 * before the timeout elapses.
91 * @param timeout how long to wait before giving up, in units of
94 * {@code timeout} parameter
106 boolean tryTransfer(E e, long timeout, TimeUnit unit) argument
H A DCountDownLatch.java239 * @param timeout the maximum time to wait
240 * @param unit the time unit of the {@code timeout} argument
246 public boolean await(long timeout, TimeUnit unit) argument
248 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
H A DExecutorService.java161 * request, or the timeout occurs, or the current thread is
164 * @param timeout the maximum time to wait
165 * @param unit the time unit of the timeout argument
167 * {@code false} if the timeout elapsed before termination
170 boolean awaitTermination(long timeout, TimeUnit unit) argument
250 * when all complete or the timeout expires, whichever happens first.
260 * @param timeout the maximum time to wait
261 * @param unit the time unit of the timeout argument
275 long timeout, TimeUnit unit)
302 * an exception), if any do before the given timeout elapse
274 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
321 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
[all...]
H A DTimeUnit.java23 * the following code will timeout in 50 milliseconds if the {@link
30 * while this code will timeout in 50 seconds:
35 * Note however, that there is no guarantee that a particular timeout
267 * This is a convenience method that converts timeout arguments
275 * public synchronized Object poll(long timeout, TimeUnit unit)
278 * unit.timedWait(this, timeout);
284 * @param timeout the maximum time to wait. If less than
288 public void timedWait(Object obj, long timeout) argument
290 if (timeout > 0) {
291 long ms = toMillis(timeout);
308 timedJoin(Thread thread, long timeout) argument
327 sleep(long timeout) argument
[all...]
H A DSemaphore.java372 * @param timeout the maximum time to wait for a permit
373 * @param unit the time unit of the {@code timeout} argument
378 public boolean tryAcquire(long timeout, TimeUnit unit) argument
380 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
543 * @param timeout the maximum time to wait for the permits
544 * @param unit the time unit of the {@code timeout} argument
550 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) argument
553 return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout));
H A DExecutorCompletionService.java171 public Future<V> poll(long timeout, TimeUnit unit) argument
173 return completionQueue.poll(timeout, unit);
H A DLinkedBlockingDeque.java374 public boolean offerFirst(E e, long timeout, TimeUnit unit) argument
378 long nanos = unit.toNanos(timeout);
397 public boolean offerLast(E e, long timeout, TimeUnit unit) argument
401 long nanos = unit.toNanos(timeout);
480 public E pollFirst(long timeout, TimeUnit unit) argument
482 long nanos = unit.toNanos(timeout);
498 public E pollLast(long timeout, TimeUnit unit) argument
500 long nanos = unit.toNanos(timeout);
625 public boolean offer(E e, long timeout, TimeUnit unit) argument
627 return offerLast(e, timeout, uni
652 poll(long timeout, TimeUnit unit) argument
[all...]
H A DExecutors.java183 * properties but different details (for example, timeout parameters)
588 public boolean awaitTermination(long timeout, TimeUnit unit) argument
590 return e.awaitTermination(timeout, unit);
606 long timeout, TimeUnit unit)
608 return e.invokeAll(tasks, timeout, unit);
615 long timeout, TimeUnit unit)
617 return e.invokeAny(tasks, timeout, unit);
605 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
614 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
H A DCyclicBarrier.java88 * point prematurely because of interruption, failure, or timeout, all
344 * <li>The specified timeout elapses; or
383 * @param timeout the time to wait for the barrier
384 * @param unit the time unit of the timeout parameter
390 * @throws TimeoutException if the specified timeout elapses
397 public int await(long timeout, TimeUnit unit) argument
401 return dowait(true, unit.toNanos(timeout));
408 * barrier due to interruption or timeout since
H A DAbstractExecutorService.java192 long timeout, TimeUnit unit)
194 return doInvokeAny(tasks, true, unit.toNanos(timeout));
229 long timeout, TimeUnit unit)
233 long nanos = unit.toNanos(timeout);
191 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
228 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
/libcore/luni/src/main/java/java/nio/channels/
H A DSelector.java113 * the calling thread is interrupted or the specified {@code timeout}
116 * @param timeout
117 * the non-negative timeout in millisecond; 0 will block forever
123 * if the given timeout argument is less than zero.
127 public abstract int select(long timeout) throws IOException; argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/
H A DSelectorTest.java273 // make sure select(timeout) doesn't block
464 private void assert_select_SelectorClosed(SelectType type, int timeout) argument
469 selectOnce(type, timeout);
476 private void assert_select_OP_ACCEPT(SelectType type, int timeout) argument
483 int count = blockingSelect(type, timeout);
491 count = selectOnce(type, timeout);
510 private void assert_select_OP_CONNECT(SelectType type, int timeout) argument
517 int count = blockingSelect(type, timeout);
525 count = selectOnce(type, timeout);
546 private void assert_select_OP_READ(SelectType type, int timeout) argument
619 assert_select_OP_WRITE(SelectType type, int timeout) argument
654 blockingSelect(SelectType type, int timeout) argument
669 selectOnce(SelectType type, int timeout) argument
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DOldAndroidDatagramTest.java167 // Regression test for issue 1018003: DatagramSocket ignored a set timeout.
170 int timeout = 5000;
175 sock.setSoTimeout(timeout);
180 if (Math.abs(delay - timeout) > 1000) {
181 fail("timeout was not accurate. expected: " + timeout
/libcore/luni/src/main/java/java/nio/
H A DSelectorImpl.java151 @Override public int select(long timeout) throws IOException { argument
152 if (timeout < 0) {
153 throw new IllegalArgumentException("timeout < 0: " + timeout);
155 // Our timeout is interpreted differently to Unix's --- 0 means block. See selectNow.
156 return selectInternal((timeout == 0) ? -1 : timeout);
163 private int selectInternal(long timeout) throws IOException { argument
169 boolean isBlocking = (timeout != 0);
179 rc = Libcore.os.poll(pollFds.array(), (int) timeout);
[all...]
/libcore/crypto/src/main/java/org/conscrypt/
H A DAbstractSessionContext.java42 volatile int timeout; field in class:AbstractSessionContext
67 * @param timeout for cache entries
69 AbstractSessionContext(int maximumSize, int timeout) { argument
71 this.timeout = timeout;
119 return timeout;
145 timeout = seconds;
152 // timeout as part of their validity condition.
/libcore/luni/src/main/java/java/net/
H A DSocket.java401 * Returns this socket's {@link SocketOptions#SO_LINGER linger} timeout in seconds, or -1
432 * Returns this socket's {@link SocketOptions#SO_TIMEOUT receive timeout}.
497 * Sets this socket's {@link SocketOptions#SO_LINGER linger} timeout in seconds.
498 * If {@code on} is false, {@code timeout} is irrelevant.
500 public void setSoLinger(boolean on, int timeout) throws SocketException { argument
503 if (on && timeout < 0) {
504 throw new IllegalArgumentException("timeout < 0");
507 impl.setOption(SocketOptions.SO_LINGER, Integer.valueOf(timeout));
514 * Sets this socket's {@link SocketOptions#SO_TIMEOUT read timeout} in milliseconds.
515 * Use 0 for no timeout
518 setSoTimeout(int timeout) argument
807 connect(SocketAddress remoteAddr, int timeout) argument
[all...]
H A DServerSocket.java181 * Gets the socket {@link SocketOptions#SO_TIMEOUT accept timeout}.
227 * Sets the {@link SocketOptions#SO_TIMEOUT accept timeout} in milliseconds for this socket.
228 * This accept timeout defines the period the socket will block waiting to
230 * {@code 0} (default) is used to set an infinite timeout. To have effect
233 * @param timeout the timeout in milliseconds or 0 for no timeout.
237 public synchronized void setSoTimeout(int timeout) throws SocketException { argument
239 if (timeout < 0) {
240 throw new IllegalArgumentException("timeout <
[all...]
H A DInetAddress.java641 * @param timeout
642 * timeout in milliseconds before the test fails if no connection
649 * if timeout is less than zero.
651 public boolean isReachable(int timeout) throws IOException { argument
652 return isReachable(null, 0, timeout);
665 * @param timeout
666 * timeout in milliseconds before the test fails if no connection
673 * if ttl or timeout is less than zero.
675 public boolean isReachable(NetworkInterface networkInterface, final int ttl, final int timeout) throws IOException { argument
676 if (ttl < 0 || timeout <
720 isReachable(InetAddress destination, InetAddress source, int timeout) argument
[all...]
H A DSocketImpl.java252 * by the {@code SocketAddress} object with the given timeout. This method
253 * will block indefinitely if the timeout is set to zero.
257 * @param timeout
258 * the timeout value in milliseconds.
262 protected abstract void connect(SocketAddress remoteAddr, int timeout) throws IOException; argument
H A DPlainSocketImpl.java113 // Reset the client's inherited read timeout to the Java-specified default of 0.
182 * @param timeout
183 * a timeout where supported. 0 means no timeout
187 private void connect(InetAddress anAddr, int aPort, int timeout) throws IOException { argument
192 IoBridge.connect(fd, normalAddr, aPort, timeout);
322 private void socksConnect(InetAddress applicationServerAddress, int applicationServerPort, int timeout) throws IOException { argument
324 IoBridge.connect(fd, socksGetServerAddress(), socksGetServerPort(), timeout);
457 protected void connect(SocketAddress remoteAddr, int timeout) throws IOException { argument
459 connect(inetAddr.getAddress(), inetAddr.getPort(), timeout);
[all...]
/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DReentrantLock.java354 * lock.tryLock(timeout, unit)) {
402 * @param timeout the time to wait for the lock
403 * @param unit the time unit of the timeout argument
411 public boolean tryLock(long timeout, TimeUnit unit) argument
413 return sync.tryAcquireNanos(1, unit.toNanos(timeout));

Completed in 207 milliseconds

123