Package rx.subjects

Class SubjectSubscriptionManager<T>

    • Constructor Detail

      • SubjectSubscriptionManager

        public SubjectSubscriptionManager()
    • Method Detail

      • setLatest

        void setLatest​(java.lang.Object value)
        Set the latest NotificationLite value.
      • getLatest

        java.lang.Object getLatest()
        Returns:
        Retrieve the latest NotificationLite value
      • add

        boolean add​(SubjectSubscriptionManager.SubjectObserver<T> o)
        Try to atomically add a SubjectObserver to the active state.
        Parameters:
        o - the SubjectObserver to add
        Returns:
        false if the subject is already in its terminal state
      • next

        SubjectSubscriptionManager.SubjectObserver<T>[] next​(java.lang.Object n)
        Set a new latest NotificationLite value and return the active observers.
        Parameters:
        n - the new latest value
        Returns:
        the array of SubjectObservers, don't write into the array!
      • terminate

        SubjectSubscriptionManager.SubjectObserver<T>[] terminate​(java.lang.Object n)
        Atomically set the terminal NotificationLite value (which could be any of the 3), clear the active observers and return the last active observers.
        Parameters:
        n - the terminal value
        Returns:
        the last active SubjectObservers