()
| 266 | } |
| 267 | |
| 268 | private boolean checkRegisterForRead() { |
| 269 | AtomicBoolean ready = new AtomicBoolean(false); |
| 270 | synchronized (nonBlockingStateLock) { |
| 271 | if (!registeredForRead) { |
| 272 | action(ActionCode.NB_READ_INTEREST, ready); |
| 273 | registeredForRead = !ready.get(); |
| 274 | } |
| 275 | } |
| 276 | return ready.get(); |
| 277 | } |
| 278 | |
| 279 | /** |
| 280 | * Called when data is available for reading. |