This class tracks the validity of the key and implements cancellation.
| Modifier and Type | Field and Description |
|---|---|
| private static final VarHandle | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| pack-priv void | |
| public final boolean | isValid()
Implements abstract java. Tells whether or not this key is valid. |
| INVALID | back to summary |
|---|---|
| private static final VarHandle INVALID | |
| invalid | back to summary |
|---|---|
| private volatile boolean invalid | |
| AbstractSelectionKey | back to summary |
|---|---|
| protected AbstractSelectionKey() Initializes a new instance of this class. | |
| cancel | back to summary |
|---|---|
| public final void cancel() Implements abstract java. Cancels this key. If this key has not yet been cancelled then it is added to its selector's cancelled-key set while synchronized on that set. | |
| invalidate | back to summary |
|---|---|
| pack-priv void invalidate() | |
| isValid | back to summary |
|---|---|
| public final boolean isValid() Implements abstract java. Doc from java. Tells whether or not this key is valid. A key is valid upon creation and remains so until it is cancelled, its channel is closed, or its selector is closed. | |