DelayQueue 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
未绑定的 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) 的方法返回的值小于或等于零时,将过期。 即使无法使用或删除takepoll未过期的元素,它们也被视为普通元素。 例如,该方法 size 返回过期和未过期元素的计数。 此队列不允许 null 元素。
此类及其迭代器实现和接口的所有 <em>可选</em> 方法Collection。Iterator 方法#iterator()<>中提供的迭代器不<>保证按任何特定顺序遍历 DelayQueue 的元素。
此类是 Java 集合框架的成员。
在 1.5 中添加。
适用于 . 的 java.util.concurrent.DelayQueueJava 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
构造函数
| DelayQueue() |
创建最初为空的新 |
| DelayQueue(ICollection) |
创建一个 |
| DelayQueue(IntPtr, JniHandleOwnership) |
创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。 |
属性
| Class |
返回此 |
| Handle |
基础 Android 实例的句柄。 (继承自 Object) |
| IsEmpty |
要添加 (继承自 AbstractCollection) |
| JniIdentityHashCode |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| JniPeerMembers |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| PeerReference |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| ThresholdClass |
此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。 |
| ThresholdType |
此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。 |
方法
| Add(Object) |
要添加 (继承自 AbstractCollection) |
| AddAll(ICollection) |
要添加 (继承自 AbstractCollection) |
| Clear() |
要添加 (继承自 AbstractCollection) |
| Clone() |
创建并返回此对象的副本。 (继承自 Object) |
| Contains(Object) |
要添加 (继承自 AbstractCollection) |
| ContainsAll(ICollection) |
要添加 (继承自 AbstractCollection) |
| Dispose() |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| Dispose(Boolean) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| DrainTo(ICollection, Int32) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| DrainTo(ICollection) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| Element() |
检索此队列的头,但不删除。 (继承自 AbstractQueue) |
| Equals(Object) |
指示其他对象是否“等于”此对象。 (继承自 Object) |
| GetHashCode() |
返回对象的哈希代码值。 (继承自 Object) |
| Iterator() |
返回此队列中所有元素(过期和未过期)的迭代器。 |
| JavaFinalize() |
当垃圾回收确定不再引用该对象时,由对象上的垃圾回收器调用。 (继承自 Object) |
| Notify() |
唤醒正在等待此对象的监视器的单个线程。 (继承自 Object) |
| NotifyAll() |
唤醒正在等待此对象的监视器的所有线程。 (继承自 Object) |
| Offer(Object, Int64, TimeUnit) |
将指定的元素插入到此延迟队列中。 |
| Offer(Object) |
将指定的元素插入到此延迟队列中。 |
| Peek() |
检索但不删除此队列的头,或返回 |
| Poll() |
检索和删除此队列的头,或者如果此队列没有延迟过期的元素,则返回 |
| Poll(Int64, TimeUnit) |
检索和删除此队列的头,或者如果此队列没有延迟过期的元素,则返回 |
| Put(Object) |
将指定的元素插入到此延迟队列中。 |
| RemainingCapacity() |
始终返回, |
| Remove() |
检索并删除此队列的头。 (继承自 AbstractQueue) |
| Remove(Object) |
要添加 (继承自 AbstractCollection) |
| RemoveAll(ICollection) |
要添加 (继承自 AbstractCollection) |
| RetainAll(ICollection) |
要添加 (继承自 AbstractCollection) |
| SetHandle(IntPtr, JniHandleOwnership) |
设置 Handle 属性。 (继承自 Object) |
| Size() |
返回包含 |
| Take() |
检索并删除此队列的头,如有必要,请等待,直到此队列上存在过期延迟的元素。 |
| ToArray() |
要添加 (继承自 AbstractCollection) |
| ToArray(Object[]) |
要添加 (继承自 AbstractCollection) |
| ToArray<T>() |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| ToString() |
返回对象的字符串表示形式。 (继承自 Object) |
| UnregisterFromRuntime() |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| Wait() |
使当前线程等待,直到唤醒它,通常是通过 em 通知/em> 或 <em>interrupted</em>。<>< (继承自 Object) |
| Wait(Int64, Int32) |
使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted</em>>,或直到经过一定数量的实时。 (继承自 Object) |
| Wait(Int64) |
使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted</em>>,或直到经过一定数量的实时。 (继承自 Object) |
显式接口实现
| IJavaPeerable.Disposed() |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| IJavaPeerable.DisposeUnlessReferenced() |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| IJavaPeerable.Finalized() |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| IJavaPeerable.JniManagedPeerState |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| IJavaPeerable.SetJniIdentityHashCode(Int32) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| IJavaPeerable.SetPeerReference(JniObjectReference) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
扩展方法
| JavaCast<TResult>(IJavaObject) |
执行 Android 运行时检查的类型转换。 |
| JavaCast<TResult>(IJavaObject) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| GetJniTypeName(IJavaPeerable) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| OfferAsync(IBlockingQueue, Object, Int64, TimeUnit) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| OfferAsync(IBlockingQueue, Object) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| PollAsync(IBlockingQueue, Int64, TimeUnit) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| PutAsync(IBlockingQueue, Object) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| TakeAsync(IBlockingQueue) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| ToEnumerable(IIterable) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |
| ToEnumerable<T>(IIterable) |
未绑定的 BlockingQueue 阻止元素队列,在该队列 |