public void setFromJson(final byte[] persisted) {
    try {
      SessionState decoded = JACKSON.readValue(persisted, SessionState.class);
      decoded.foreachPartition(new Action1<PartitionState>() {
        int i = 0;

        @Override
        public void call(PartitionState dps) {
          partitionStates.set(i++, dps);
        }
      });
    } catch (Exception ex) {
      throw new RuntimeException("Could not decode SessionState from JSON.", ex);
    }
  }
public void setFromJson ( final byte [ ] persisted ) { try { SessionState decoded = JACKSON . readValue ( persisted , SessionState . class ) ; decoded . foreachPartition ( new Action1 < PartitionState > ( ) { int i = 0 ; @ Override public void call ( PartitionState dps ) { partitionStates . set ( i ++ , dps ) ; } } ) ; } catch ( Exception ex ) { throw new RuntimeException ( "Could not decode SessionState from JSON." , ex ) ; } }
Recovers the session state from persisted JSON.

@param persisted the persisted JSON format.