Check and register for write interest. @return true if ready for write
()
| 948 | * @return {@code true} if ready for write |
| 949 | */ |
| 950 | public boolean checkRegisterForWrite() { |
| 951 | AtomicBoolean ready = new AtomicBoolean(false); |
| 952 | synchronized (nonBlockingStateLock) { |
| 953 | if (!registeredForWrite) { |
| 954 | action(ActionCode.NB_WRITE_INTEREST, ready); |
| 955 | registeredForWrite = !ready.get(); |
| 956 | } |
| 957 | } |
| 958 | return ready.get(); |
| 959 | } |
| 960 | |
| 961 | /** |
| 962 | * Called when writing is possible. |
no test coverage detected