title: How to access state scoped to current behaviour from postStop
body: <p>I have an online game, with an actor that represents a user's state. State updates via recursive <code>become</code> calls:</p>
  
  <pre><code>private PartialFunction&lt;Object, BoxedUnit&gt; updatedUser(final User user) {
      return ReceiveBuilder.
          ...
          matchEquals("update", s -&gt; {
              context().become(updatedUser(new User(...)));
          }).build();
  }
  </code></pre>
  
  <p>Now when the user leaves the game (actor stops), I need to save its state to a database. I think the ideal place for this would be sending a message from <code>postStop</code>. But user's state is out of scope.</p>
  
  <pre><code>public void postStop() throws Exception {
      //user state out of scope
      Database.tell(user, self());
  
  }
  </code></pre>
  
  <p>I don't want to have state as an actor field. What would be the best way to solve this problem?</p>