com.qifun.statelessFuture.util.io

SocketWritingQueue

trait SocketWritingQueue extends AnyRef

写入Socket的缓冲数据队列。

Note

SocketWritingQueue保证线程安全,允许多个线程向这里提交要写入的数据。 enqueue提交的缓冲区将按提交顺序排队写入,而不会混合。

Linear Supertypes
AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SocketWritingQueue
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val socket: AsynchronousSocketChannel

    Attributes
    protected
  2. abstract def writingTimeout: Duration

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def enqueue(buffer: ByteBuffer): Unit

    Add buffer to this SocketWritingQueue.

    Add buffer to this SocketWritingQueue.

    If this SocketWritingQueue is closing or closed, the enqueue operation will be ignored.

    Annotations
    @tailrec()
    Note

    This SocketWritingQueue will change position in each of buffers, but will not change the content of these buffers. To prevent this behavior, please duplicate these buffers before enqueue.

  7. final def enqueue(buffers: ByteBuffer*): Unit

    Add buffers to this SocketWritingQueue.

    Add buffers to this SocketWritingQueue.

    If this SocketWritingQueue is closing or closed, the enqueue operation will be ignored.

    Annotations
    @tailrec()
    Note

    This SocketWritingQueue will change position in each of buffers, but will not change the content of these buffers. To prevent this behavior, please duplicate these buffers before enqueue.

  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def flush(): Unit

    Annotations
    @tailrec()
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def interrupt(): Unit

    强行关闭本SocketWritingQueue

    强行关闭本SocketWritingQueue

    立即关闭socket,抛弃所有尚未发送的数据。 如果多次调用interrupt,只有第一次调用有效,后面几次会被忽略。

  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def shutDown(): Unit

    优雅的关闭本SocketWritingQueue

    优雅的关闭本SocketWritingQueue

    如果本SocketWritingQueue队列中存在尚未发送的数据, 那么只有当这些数据全部交给socket发送后,socket才会真正被关闭。

    如果多次调用shutDown,只有第一次调用有效,后面几次会被忽略。

    Annotations
    @tailrec()
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped