Result of a query for buffered notifications. Notifications in a notification buffer have positive, monotonically increasing sequence numbers. The result of a notification query contains the following elements:
It is possible for the nextSequenceNumber to be less
than the earliestSequenceNumber. This signifies that
notifications between the two might have been lost.
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private long | |
| private static final long | |
| private TargetedNotification[] |
| Access | Constructor and Description |
|---|---|
| public | NotificationResult(long
the sequence number of the
earliest notification still in the buffer. earliestSequenceNumber, long the sequence number of the next
notification available for querying. nextSequenceNumber, TargetedNotification[] the notifications resulting from
the query, and the listeners they correspond to. This array
can be empty. targetedNotifications)Constructs a notification query result. |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: the sequence number of the earliest notification still in the buffer.Returns the sequence number of the earliest notification still in the buffer. |
| public long | Returns: the sequence number of the next notification available for querying.Returns the sequence number of the next notification available for querying. |
| public TargetedNotification[] | Returns: the notifications resulting from the query, and the listeners they correspond to. This array can be empty.Returns the notifications resulting from the query, and the listeners they correspond to. |
| private void | |
| public String | Returns: a string representation of the object.Overrides java. Returns a string representation of the object. |
| private static void | validate(TargetedNotification[] targetedNotifications, long earliestSequenceNumber, long nextSequenceNumber)
|
| earliestSequenceNumber | back to summary |
|---|---|
| private long earliestSequenceNumber | |
| nextSequenceNumber | back to summary |
|---|---|
| private long nextSequenceNumber | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| targetedNotifications | back to summary |
|---|---|
| private TargetedNotification[] targetedNotifications | |
| NotificationResult | back to summary |
|---|---|
| public NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications) Constructs a notification query result.
| |
| getEarliestSequenceNumber | back to summary |
|---|---|
| public long getEarliestSequenceNumber() Returns the sequence number of the earliest notification still in the buffer.
| |
| getNextSequenceNumber | back to summary |
|---|---|
| public long getNextSequenceNumber() Returns the sequence number of the next notification available for querying.
| |
| getTargetedNotifications | back to summary |
|---|---|
| public TargetedNotification[] getTargetedNotifications() Returns the notifications resulting from the query, and the listeners they correspond to.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the object. The result should be a concise but informative representation that is easy for a person to read.
| |
| validate | back to summary |
|---|---|
| private static void validate(TargetedNotification[] targetedNotifications, long earliestSequenceNumber, long nextSequenceNumber) throws IllegalArgumentException | |