public class SharedSelector extends Selector
wakeupAndRegister(SelectableChannel, int, Object)
.Constructor and Description |
---|
SharedSelector(Selector delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isOpen() |
Optional<SelectionKey> |
keyFor(SelectableChannel channel) |
Set<SelectionKey> |
keys() |
SelectorProvider |
provider() |
int |
select() |
int |
select(long timeout) |
Set<SelectionKey> |
selectedKeys() |
int |
selectNow() |
Selector |
wakeup() |
void |
wakeupAndRegister(SelectableChannel channel,
int ops,
Object attachment)
Atomically wakeup and register the provided channel.
|
public SharedSelector(Selector delegate)
public SelectorProvider provider()
public Set<SelectionKey> keys()
public Set<SelectionKey> selectedKeys()
selectedKeys
in class Selector
public int selectNow() throws IOException
selectNow
in class Selector
IOException
public int select(long timeout) throws IOException
select
in class Selector
IOException
public int select() throws IOException
select
in class Selector
IOException
public void wakeupAndRegister(SelectableChannel channel, int ops, Object attachment)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Selector
IOException
public Optional<SelectionKey> keyFor(SelectableChannel channel)
Copyright © 2016–2021. All rights reserved.