Searched defs:timeout (Results 1 - 25 of 46) sorted by relevance

12

/libcore/luni/src/main/java/java/nio/channels/
H A DSelector.java112 * the calling thread is interrupted or the specified {@code timeout}
115 * @param timeout
116 * the non-negative timeout in millisecond; 0 will block forever
122 * if the given timeout argument is less than zero.
126 public abstract int select(long timeout) throws IOException; argument
/libcore/luni/src/main/java/java/util/concurrent/
H A DCompletionService.java87 * @param timeout how long to wait before giving up, in units of
90 * <tt>timeout</tt> parameter
96 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 DAbstractExecutorService.java194 long timeout, TimeUnit unit)
196 return doInvokeAny(tasks, true, unit.toNanos(timeout));
230 long timeout, TimeUnit unit)
234 long nanos = unit.toNanos(timeout);
193 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
229 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
H A DBlockingQueue.java211 * @param timeout how long to wait before giving up, in units of
214 * <tt>timeout</tt> parameter
224 boolean offer(E e, long timeout, TimeUnit unit) argument
240 * @param timeout how long to wait before giving up, in units of
243 * <tt>timeout</tt> parameter
248 E poll(long timeout, TimeUnit unit) argument
H A DCountDownLatch.java244 * @param timeout the maximum time to wait
245 * @param unit the time unit of the {@code timeout} argument
251 public boolean await(long timeout, TimeUnit unit) argument
253 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
H A DExecutorCompletionService.java171 public Future<V> poll(long timeout, TimeUnit unit) argument
173 return completionQueue.poll(timeout, unit);
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 * <tt>false</tt> if the timeout elapsed before termination
170 boolean awaitTermination(long timeout, TimeUnit unit) argument
252 * when all complete or the timeout expires, whichever happens first.
262 * @param timeout the maximum time to wait
263 * @param unit the time unit of the timeout argument
277 long timeout, TimeUnit unit)
304 * an exception), if any do before the given timeout elapse
276 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
323 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
[all...]
H A DCyclicBarrier.java85 * point prematurely because of interruption, failure, or timeout, all
341 * <li>The specified timeout elapses; or
380 * @param timeout the time to wait for the barrier
381 * @param unit the time unit of the timeout parameter
387 * @throws TimeoutException if the specified timeout elapses
394 public int await(long timeout, TimeUnit unit) argument
398 return dowait(true, unit.toNanos(timeout));
405 * barrier due to interruption or timeout since
H A DBlockingDeque.java275 * @param timeout how long to wait before giving up, in units of
278 * <tt>timeout</tt> 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 * <tt>timeout</tt> 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 * <tt>timeout</tt> parameter
344 E pollFirst(long timeout, TimeUnit unit) argument
352 * @param timeout ho
360 pollLast(long timeout, TimeUnit unit) argument
473 offer(E e, long timeout, TimeUnit unit) argument
524 poll(long timeout, TimeUnit unit) argument
[all...]
H A DDelayQueue.java136 * @param timeout This parameter is ignored as the method never blocks
141 public boolean offer(E e, long timeout, TimeUnit unit) { argument
216 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument
217 long nanos = unit.toNanos(timeout);
H A DSemaphore.java377 * @param timeout the maximum time to wait for a permit
378 * @param unit the time unit of the {@code timeout} argument
383 public boolean tryAcquire(long timeout, TimeUnit unit) argument
385 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
549 * @param timeout the maximum time to wait for the permits
550 * @param unit the time unit of the {@code timeout} argument
556 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) argument
559 return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout));
H A DArrayBlockingQueue.java310 public boolean offer(E e, long timeout, TimeUnit unit) argument
314 long nanos = unit.toNanos(timeout);
352 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument
353 long nanos = unit.toNanos(timeout);
H A DExchanger.java233 * interruption, timeout, or elapsed spin-waits. This value is
520 * only upon return from timeout while waiting in slot 0. When a
636 * @param timeout the maximum time to wait
637 * @param unit the time unit of the <tt>timeout</tt> argument
644 public V exchange(V x, long timeout, TimeUnit unit) argument
648 true, unit.toNanos(timeout));
H A DExecutors.java144 * properties but different details (for example, timeout parameters)
605 public boolean awaitTermination(long timeout, TimeUnit unit) argument
607 return e.awaitTermination(timeout, unit);
623 long timeout, TimeUnit unit)
625 return e.invokeAll(tasks, timeout, unit);
632 long timeout, TimeUnit unit)
634 return e.invokeAny(tasks, timeout, unit);
622 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
631 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
H A DFutureTask.java88 public V get(long timeout, TimeUnit unit) argument
90 return sync.innerGet(unit.toNanos(timeout));
H A DLinkedBlockingQueue.java342 public boolean offer(E e, long timeout, TimeUnit unit) argument
346 long nanos = unit.toNanos(timeout);
427 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument
430 long nanos = unit.toNanos(timeout);
H A DTimeUnit.java23 * the following code will timeout in 50 milliseconds if the {@link
29 * 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...]
/libcore/luni/src/main/java/java/net/
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 DDatagramSocket.java221 * Gets the socket {@link SocketOptions#SO_TIMEOUT receive timeout}.
235 * is truncated. This method blocks until a packet is received or a timeout
333 * Sets the {@link SocketOptions#SO_TIMEOUT read timeout} in milliseconds for this socket.
334 * This receive timeout defines the period the socket will block waiting to
336 * {@code 0} (default) is used to set an infinite timeout. To have effect
339 * @param timeout the timeout in milliseconds or 0 for no timeout.
343 public synchronized void setSoTimeout(int timeout) throws SocketException { argument
344 if (timeout <
[all...]
H A DServerSocket.java180 * Gets the socket {@link SocketOptions#SO_TIMEOUT accept timeout}.
226 * Sets the {@link SocketOptions#SO_TIMEOUT accept timeout} in milliseconds for this socket.
227 * This accept timeout defines the period the socket will block waiting to
229 * {@code 0} (default) is used to set an infinite timeout. To have effect
232 * @param timeout the timeout in milliseconds or 0 for no timeout.
236 public synchronized void setSoTimeout(int timeout) throws SocketException { argument
238 if (timeout < 0) {
239 throw new IllegalArgumentException("timeout <
[all...]
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/
H A DAbstractSessionContext.java42 volatile int timeout; field in class:AbstractSessionContext
62 * @param timeout for cache entries
64 AbstractSessionContext(int maximumSize, int timeout) { argument
66 this.timeout = timeout;
114 return timeout;
140 timeout = seconds;
147 // timeout as part of their validity condition.
/libcore/luni/src/main/java/java/nio/
H A DSelectorImpl.java151 @Override public int select(long timeout) throws IOException { argument
152 if (timeout < 0) {
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 isBlock = (timeout != 0);
179 rc = Libcore.os.poll(pollFds.array(), (int) timeout);
H A DSocketChannelImpl.java505 public void connect(SocketAddress remoteAddr, int timeout) throws IOException { argument
512 super.connect(remoteAddr, timeout);
/libcore/luni/src/main/java/java/sql/
H A DConnection.java789 * @param timeout number of seconds to wait for a response before giving up and returning false,
791 * @throws SQLException if {@code timeout < 0}
793 public boolean isValid(int timeout) throws SQLException; argument

Completed in 195 milliseconds

12