美文网首页
Reactive编程

Reactive编程

作者: brightranger | 来源:发表于2021-08-12 14:34 被阅读0次

    Selector类

    类图

    @startuml
    
    interface Closeable{
        + void close()
    }
    interface AutoCloseable{
        + void close()
    }
    
    abstract class Selector{
        # Selector()
        + Selector open()
        + boolean isOpen()
        + SelectorProvider provider()
        + Set<SelectionKey> keys()
        + Set<SelectionKey> selectedKeys()
        + int selectNow()
        + int select()
        + int select(long timeout)
        + Selector wakeup()
        + void close()
    }
    abstract class AbstractSelector{
        + AtomicBoolean selectorOpen
        - SelectorProvider provider
        - Set<SelectionKey> cancelledKeys
        - Interruptible interruptor
        # AbstractSelector(SelectorProvider provider)
        # void begin()
        # void end()
    }
    
    abstract class SelectorImpl{
        # Set<SelectionKey> selectedKeys
        # HashSet<SelectionKey> keys
        # Set<SelectionKey> publicKeys
        # Set<SelectionKey> publicSelectedKeys
        # SelectorImpl(SelectorProvider var1)
        # Set<SelectionKey> keys()
        # Set<SelectionKey> selectedKeys()
    }
    class WindowsSelectorImpl {
    
    }
    
    abstract class SelectionKey {
        # SelectionKey()
        + SelectableChannel channel()
        + Selector selector()
        + boolean isValid()
        + void cancel()
        + int interestOps()
        + SelectionKey interestOps(int ops)
        + int readyOps()
    }
    
    
    Selector <|-- AbstractSelector
    AutoCloseable <|-- Closeable
    Closeable <|-- Selector
    AbstractSelector <|-- SelectorImpl
    SelectorImpl <|-- WindowsSelectorImpl
    SelectionKey <.. Selector
    SelectionKey <.. SelectorImpl
    SelectionKey <.. AbstractSelector
    SelectionKey <.. WindowsSelectorImpl
    
    @enduml
    
    selector.png

    相关文章

      网友评论

          本文标题:Reactive编程

          本文链接:https://www.haomeiwen.com/subject/fqqlbltx.html