equal
deleted
inserted
replaced
101 * Retrieves and removes all pending events for this watch key, returning |
101 * Retrieves and removes all pending events for this watch key, returning |
102 * a {@code List} of the events that were retrieved. |
102 * a {@code List} of the events that were retrieved. |
103 * |
103 * |
104 * <p> Note that this method does not wait if there are no events pending. |
104 * <p> Note that this method does not wait if there are no events pending. |
105 * |
105 * |
106 * @return The list of the events retrieved |
106 * @return the list of the events retrieved |
107 */ |
107 */ |
108 public abstract List<WatchEvent<?>> pollEvents(); |
108 public abstract List<WatchEvent<?>> pollEvents(); |
109 |
109 |
110 /** |
110 /** |
111 * Resets this watch key. |
111 * Resets this watch key. |
115 * if there are pending events for the object then this watch key is |
115 * if there are pending events for the object then this watch key is |
116 * immediately re-queued to the watch service. If there are no pending |
116 * immediately re-queued to the watch service. If there are no pending |
117 * events then the watch key is put into the ready state and will remain in |
117 * events then the watch key is put into the ready state and will remain in |
118 * that state until an event is detected or the watch key is cancelled. |
118 * that state until an event is detected or the watch key is cancelled. |
119 * |
119 * |
120 * @return {@code true} if the watch key is valid and has been reset; |
120 * @return {@code true} if the watch key is valid and has been reset, and |
121 * {@code false} if the watch key could not be reset because it is |
121 * {@code false} if the watch key could not be reset because it is |
122 * no longer {@link #isValid valid} |
122 * no longer {@link #isValid valid} |
123 */ |
123 */ |
124 public abstract boolean reset(); |
124 public abstract boolean reset(); |
125 |
125 |