public class NotificationResult extends Object implements Serializable
用于缓冲通知的查询的结果。通知缓冲区中的通知具有正的、单调递增的序列号。通知查询的结果包含以下元素:
为nextSequenceNumber
是小于earliestSequenceNumber
是可能的。这意味着这两个之间的通知可能已经丢失了。
Constructor and Description |
---|
NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications)
构造一个通知查询结果。
|
Modifier and Type | Method and Description |
---|---|
long |
getEarliestSequenceNumber()
返回缓冲区中的最早通知的序列号。
|
long |
getNextSequenceNumber()
返回用于查询的下一个通知的序列号。
|
TargetedNotification[] |
getTargetedNotifications()
返回查询所产生的通知,以及它们对应的侦听器。
|
String |
toString()
返回对象的字符串表示形式。
|
public NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications)
构造一个通知查询结果。
earliestSequenceNumber
仍然在缓冲区中最早的通知序号。
nextSequenceNumber
-可供查询的序列号下通知。
targetedNotifications
从查询产生的通知,和他们对应的听众。这个数组可以是空的。
IllegalArgumentException
-如果
earliestSequenceNumber
或
nextSequenceNumber
targetedNotifications
为空或是消极的。
public long getEarliestSequenceNumber()
public long getNextSequenceNumber()
public TargetedNotification[] getTargetedNotifications()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.