共用方式為


DelayQueue 類別

定義

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

[Android.Runtime.Register("java/util/concurrent/DelayQueue", DoNotGenerateAcw=true)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.util.concurrent.Delayed" })]
public class DelayQueue : Java.Util.AbstractQueue, IDisposable, Java.Interop.IJavaPeerable, Java.Util.Concurrent.IBlockingQueue
[<Android.Runtime.Register("java/util/concurrent/DelayQueue", DoNotGenerateAcw=true)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E extends java.util.concurrent.Delayed" })>]
type DelayQueue = class
    inherit AbstractQueue
    interface IBlockingQueue
    interface IQueue
    interface ICollection
    interface IIterable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
繼承
屬性
實作

備註

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。 <佇列的 em>head</em> 是Delayed過去延遲最晚到期的專案。 如果沒有延遲過期,就不會有前端,而且 poll 會傳回 null。 當專案的 getDelay(TimeUnit.NANOSECONDS) 方法傳回小於或等於零的值時,就會發生到期。 即使無法使用 或 poll移除take未到期的項目,否則會將其視為一般專案。 例如, size 方法會傳回過期和未到期元素的計數。 此佇列不允許 Null 元素。

這個類別及其反覆運算器會實作 和 Iterator 介面的所有 <em> 選擇性</em> 方法Collection。 方法#iterator()<>中提供的 Iterator 不<>保證會以任何特定順序周遊 DelayQueue 的元素。

這個類別是 Java Collections Framework 的成員

已在1.5中新增。

java.util.concurrent.DelayQueueJava 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

建構函式

DelayQueue()

建立空白的新 DelayQueue

DelayQueue(ICollection)

建立一 DelayQueue 開始包含指定實例集合的專案 Delayed

DelayQueue(IntPtr, JniHandleOwnership)

建立 JNI 物件的 Managed 表示法時使用的建構函式;由運行時間呼叫。

屬性

Class

傳回這個 Object的運行時間類別。

(繼承來源 Object)
Handle

基礎Android實例的句柄。

(繼承來源 Object)
IsEmpty

要新增

(繼承來源 AbstractCollection)
JniIdentityHashCode

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
JniPeerMembers

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

PeerReference

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
ThresholdClass

此 API 支援適用於 Android 的 Mono 基礎結構,並不適合直接從您的程式代碼使用。

ThresholdType

此 API 支援適用於 Android 的 Mono 基礎結構,並不適合直接從您的程式代碼使用。

方法

Add(Object)

要新增

(繼承來源 AbstractCollection)
AddAll(ICollection)

要新增

(繼承來源 AbstractCollection)
Clear()

要新增

(繼承來源 AbstractCollection)
Clone()

建立並傳回這個 對象的複本。

(繼承來源 Object)
Contains(Object)

要新增

(繼承來源 AbstractCollection)
ContainsAll(ICollection)

要新增

(繼承來源 AbstractCollection)
Dispose()

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
Dispose(Boolean)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
DrainTo(ICollection)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

DrainTo(ICollection, Int32)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

Element()

擷取但不會移除此佇列的前端。

(繼承來源 AbstractQueue)
Equals(Object)

指出其他物件是否「等於」這個物件。

(繼承來源 Object)
GetHashCode()

傳回此物件的雜湊碼值。

(繼承來源 Object)
Iterator()

傳回此佇列中所有元素的反覆運算器(已過期和未到期)。

JavaFinalize()

當垃圾收集決定不再參考物件時,垃圾收集行程在 物件上呼叫。

(繼承來源 Object)
Notify()

喚醒正在等候此物件監視器的單一線程。

(繼承來源 Object)
NotifyAll()

喚醒正在等候此物件監視器的所有線程。

(繼承來源 Object)
Offer(Object)

將指定的專案插入這個延遲佇列中。

Offer(Object, Int64, TimeUnit)

將指定的專案插入這個延遲佇列中。

Peek()

擷取,但不會移除此佇列的前端,如果這個佇列是空的,則傳回 null

Poll()

擷取並移除此佇列的前端,如果此佇列沒有延遲過期的專案,則傳回 null

Poll(Int64, TimeUnit)

擷取並移除此佇列的前端,如果此佇列沒有延遲過期的專案,則傳回 null

Put(Object)

將指定的專案插入這個延遲佇列中。

RemainingCapacity()

一律會傳回 , Integer.MAX_VALUE 因為 DelayQueue 不是因為不容量限制。

Remove()

擷取並移除此佇列的前端。

(繼承來源 AbstractQueue)
Remove(Object)

要新增

(繼承來源 AbstractCollection)
RemoveAll(ICollection)

要新增

(繼承來源 AbstractCollection)
RetainAll(ICollection)

要新增

(繼承來源 AbstractCollection)
SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
Size()

傳回這個 Collection 包含之物件數目的計數。

Take()

擷取並移除此佇列的前端,視需要等候,直到此佇列上有過期延遲的項目為止。

ToArray()

要新增

(繼承來源 AbstractCollection)
ToArray(Object[])

要新增

(繼承來源 AbstractCollection)
ToArray<T>()

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
ToString()

傳回物件的字串表示。

(繼承來源 Object)
UnregisterFromRuntime()

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
Wait()

讓目前線程等候直到喚醒為止,通常是藉由em <notified/em>或<em>interrupted</em> 來喚醒它。<>

(繼承來源 Object)
Wait(Int64)

讓目前的線程等到喚醒為止,通常是因為 <em>notified</em> 或 <em>interrupted</em>,或直到經過一定數量的實時為止。

(繼承來源 Object)
Wait(Int64, Int32)

讓目前的線程等到喚醒為止,通常是因為 <em>notified</em> 或 <em>interrupted</em>,或直到經過一定數量的實時為止。

(繼承來源 Object)

明確介面實作

IJavaPeerable.Disposed()

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
IJavaPeerable.DisposeUnlessReferenced()

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
IJavaPeerable.Finalized()

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
IJavaPeerable.JniManagedPeerState

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

(繼承來源 Object)

擴充方法

JavaCast<TResult>(IJavaObject)

執行 Android 執行時間檢查的類型轉換。

JavaCast<TResult>(IJavaObject)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

GetJniTypeName(IJavaPeerable)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

OfferAsync(IBlockingQueue, Object)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

OfferAsync(IBlockingQueue, Object, Int64, TimeUnit)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

PollAsync(IBlockingQueue, Int64, TimeUnit)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

PutAsync(IBlockingQueue, Object)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

TakeAsync(IBlockingQueue)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

ToEnumerable(IIterable)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

ToEnumerable<T>(IIterable)

未系結的 BlockingQueue 封鎖元素佇列 Delayed ,元素只能在其延遲過期時取得。

適用於