Class FragmentInstanceStateMachine


  • @ThreadSafe
    public class FragmentInstanceStateMachine
    extends java.lang.Object
    • Constructor Detail

      • FragmentInstanceStateMachine

        public FragmentInstanceStateMachine​(FragmentInstanceId fragmentInstanceId,
                                            java.util.concurrent.Executor executor)
    • Method Detail

      • getCreatedTime

        public long getCreatedTime()
      • getFailureCauses

        public java.util.concurrent.LinkedBlockingQueue<java.lang.Throwable> getFailureCauses()
      • transitionToFlushing

        public void transitionToFlushing()
      • finished

        public void finished()
      • cancel

        public void cancel()
      • abort

        public void abort()
      • failed

        public void failed​(java.lang.Throwable cause)
      • addStateChangeListener

        public void addStateChangeListener​(StateMachine.StateChangeListener<FragmentInstanceState> stateChangeListener)
        Listener is always notified asynchronously using a dedicated notification thread pool so, care should be taken to avoid leaking this when adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution.
      • sourceTaskFailed

        public void sourceTaskFailed​(FragmentInstanceId instanceId,
                                     java.lang.Throwable failure)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object