public abstract class AbstractSelectionKey extends SelectionKey
This class tracks the validity of the key and implements cancellation.
SelectionKey
A key is valid upon creation and remains so until it is cancelled, its channel is closed, or its selector is closed.
isValid
true
If this key has not yet been cancelled then it is added to its selector's cancelled-key set while synchronized on that set.
cancel
© 2021 Oracle Corporation and/or its affiliates