Class

com.twitter.finagle.pushsession

RefPushSession

Related Doc: package pushsession

Permalink

final class RefPushSession[In, Out] extends PushSession[In, Out]

Proxy PushSession which can update the underlying session.

Thread safety considerations

- receive is only intended to be called from within the serial executor, which is a general rule in all PushSession implementations. - updateRef should be called only from within the handle's serial executor. This is to avoid race conditions between closing the underlying session (which happens in the serial executor) and replacing it with a new session: if replacing happens in the same thread, there is no need to worry about broadcasting close events from the old session to the new one. - close and status are safe to call from any thread.

Linear Supertypes
PushSession[In, Out], Closable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RefPushSession
  2. PushSession
  3. Closable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RefPushSession(handle: PushChannelHandle[In, Out], initial: PushSession[In, Out])

    Permalink

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def close(deadline: Time): Future[Unit]

    Permalink

    Close the underlying session

    Close the underlying session

    Calls to this method are bounced through the serial-executor to help alleviate race conditions where the underlying session is replaced concurrently with the underlying session being closed.

    Definition Classes
    RefPushSession → Closable
  7. def close(after: Duration): Future[Unit]

    Permalink
    Definition Classes
    Closable
  8. final def close(): Future[Unit]

    Permalink
    Definition Classes
    Closable
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def receive(message: In): Unit

    Permalink

    Receive a message, most commonly from the socket.

    Receive a message, most commonly from the socket. Received messages are considered owned by the PushSession meaning the session is responsible for cleaning up any associated resources.

    Definition Classes
    RefPushSessionPushSession
  19. def status: Status

    Permalink

    The current availability Status of this PushSession.

    The current availability Status of this PushSession.

    Definition Classes
    RefPushSessionPushSession
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. def updateRef(session: PushSession[In, Out]): Unit

    Permalink

    Replaces the current PushSession, directing inbound events to the new session.

    Replaces the current PushSession, directing inbound events to the new session.

    Note

    other than no longer receiving inbound messages, the replaced session is still active and it is the responsibility of the caller to manage the lifecycle of the replaced session.

    ,

    It is unsafe to update the reference from outside of serial executor and may result in undefined behavior.

  23. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PushSession[In, Out]

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped