インタフェース TimeoutGettable
- すべてのスーパーインタフェース:
Gettable<TimeoutAndUnit>
- 既知のサブインタフェースのリスト:
TimeoutProperty
public interface TimeoutGettable extends Gettable<TimeoutAndUnit>
TimeoutAndUnit value Getter.
- 関連項目:
TimeUnit
,TimeoutAndUnit
,Gettable
-
メソッドの概要
修飾子とタイプ メソッド 説明 default boolean
awaitTermination(java.util.concurrent.ExecutorService executorService)
This calls ExecutorService#awaitTermination(long, TimeUnit).default <T> T
blockingQueuePoll(java.util.concurrent.BlockingQueue<T> queue)
This calls BlockingQueue#poll(long, TimeUnit).default boolean
conditionAwait(java.util.concurrent.locks.Condition condition)
This calls Condition#await(long, TimeUnit).default <T> T
futureGet(java.util.concurrent.Future<T> future)
This calls Future#get(long, TimeUnit).TimeoutAndUnit
get()
Value Getter.default long
getTimeout()
Returns timeout(long) value.default java.util.concurrent.TimeUnit
getTimeUnit()
Returns TimeUnit.default <T> java.util.List<java.util.concurrent.Future<T>>
invokeAll(java.util.concurrent.ExecutorService executorService, java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
This calls ExecutorService#invokeAll(Collection, long, TimeUnit).default <T> T
invokeAny(java.util.concurrent.ExecutorService executorService, java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
This calls ExecutorService#invokeAny(Collection, long, TimeUnit).default void
join(java.lang.Thread thread)
This calls TimeUnit#timedJoin(Thread, long).default boolean
lockTryLock(java.util.concurrent.locks.Lock lock)
This calls Lock#tryLock(long, TimeUnit).default void
sleep()
This calls TimeUnit#sleep(long).default void
wait(java.lang.Object sync)
This calls TimeUnit#timedWait(Object, long).
-
メソッドの詳細
-
get
TimeoutAndUnit get()Value Getter.- 戻り値:
- value
-
getTimeout
default long getTimeout()Returns timeout(long) value.- 戻り値:
- timeout(long) value
- 関連項目:
TimeoutAndUnit.timeout()
-
getTimeUnit
default java.util.concurrent.TimeUnit getTimeUnit()Returns TimeUnit.- 戻り値:
- TimeUnit
- 関連項目:
TimeoutAndUnit.unit()
-
sleep
default void sleep() throws java.lang.InterruptedExceptionThis calls TimeUnit#sleep(long).- 例外:
java.lang.InterruptedException
- if interrupted while sleeping- 関連項目:
TimeUnit.sleep(long)
-
join
default void join(java.lang.Thread thread) throws java.lang.InterruptedExceptionThis calls TimeUnit#timedJoin(Thread, long).- パラメータ:
thread
- the Thread- 例外:
java.lang.InterruptedException
- if interrupted while waiting- 関連項目:
TimeUnit.timedJoin(Thread, long)
-
wait
default void wait(java.lang.Object sync) throws java.lang.InterruptedExceptionThis calls TimeUnit#timedWait(Object, long).- パラメータ:
sync
- the object to wait on- 例外:
java.lang.InterruptedException
- if interrupted while waiting- 関連項目:
TimeUnit.timedWait(Object, long)
-
blockingQueuePoll
default <T> T blockingQueuePoll(java.util.concurrent.BlockingQueue<T> queue) throws java.lang.InterruptedExceptionThis calls BlockingQueue#poll(long, TimeUnit).- 型パラメータ:
T
- Type- パラメータ:
queue
- the BlockingQueue- 戻り値:
- poll-value
- 例外:
java.lang.InterruptedException
- if interrupted while waiting- 関連項目:
BlockingQueue.poll(long, TimeUnit)
-
lockTryLock
default boolean lockTryLock(java.util.concurrent.locks.Lock lock) throws java.lang.InterruptedExceptionThis calls Lock#tryLock(long, TimeUnit).- パラメータ:
lock
- the Lock- 戻り値:
- true if the lock was acquired and false if the waiting time elapsed before the lock was acquired
- 例外:
java.lang.InterruptedException
- if the current thread is interrupted while acquiring the lock (and interruption of lock acquisition is supported)- 関連項目:
Lock.tryLock(long, TimeUnit)
-
conditionAwait
default boolean conditionAwait(java.util.concurrent.locks.Condition condition) throws java.lang.InterruptedExceptionThis calls Condition#await(long, TimeUnit).- パラメータ:
condition
- the Condition- 戻り値:
- false if the waiting time detectably elapsed before return from the method, else true
- 例外:
java.lang.InterruptedException
- if the current thread is interrupted (and interruption of thread suspension is supported)- 関連項目:
Condition.await(long, TimeUnit)
-
futureGet
default <T> T futureGet(java.util.concurrent.Future<T> future) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException, java.util.concurrent.ExecutionExceptionThis calls Future#get(long, TimeUnit).- 型パラメータ:
T
- Type- パラメータ:
future
- the Future- 戻り値:
- future-result
- 例外:
java.lang.InterruptedException
- if the current thread was interrupted while waitingjava.util.concurrent.TimeoutException
- if the wait timed outjava.util.concurrent.ExecutionException
- if the computation threw an exception- 関連項目:
Future.get(long, TimeUnit)
-
invokeAll
default <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.concurrent.ExecutorService executorService, java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedExceptionThis calls ExecutorService#invokeAll(Collection, long, TimeUnit).- 型パラメータ:
T
- Type- パラメータ:
executorService
- the ExecutorServicetasks
- collection of tasks- 戻り値:
- Future result list
- 例外:
java.lang.InterruptedException
- if the current thread was interrupted while waiting- 関連項目:
ExecutorService.invokeAll(Collection, long, TimeUnit)
-
invokeAny
default <T> T invokeAny(java.util.concurrent.ExecutorService executorService, java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException, java.util.concurrent.ExecutionExceptionThis calls ExecutorService#invokeAny(Collection, long, TimeUnit).- 型パラメータ:
T
- Type- パラメータ:
executorService
- the ExecutorServicetasks
- the collection of tasks- 戻り値:
- Callable result
- 例外:
java.lang.InterruptedException
- if the current thread was interrupted while waitingjava.util.concurrent.TimeoutException
- if the wait timed outjava.util.concurrent.ExecutionException
- if the computation threw an exception- 関連項目:
ExecutorService.invokeAny(Collection, long, TimeUnit)
-
awaitTermination
default boolean awaitTermination(java.util.concurrent.ExecutorService executorService) throws java.lang.InterruptedExceptionThis calls ExecutorService#awaitTermination(long, TimeUnit).- パラメータ:
executorService
- the ExecutorService- 戻り値:
- true if this executor terminated and false if the timeout elapsed before termination
- 例外:
java.lang.InterruptedException
- if interrupted while waiting- 関連項目:
ExecutorService.awaitTermination(long, TimeUnit)
-