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