public void saveState ( ) { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; try { ObjectOutputStream oos = new ObjectOutputStream ( bos ) ; oos . writeObject ( this ) ; oos . flush ( ) ; keyValStore . setValue ( keyValStoreName , Hex . toHexString ( bos . toByteArray ( ) ) ) ; bos . close ( ) ; } catch ( IOException e ) { logger . debug ( String . format ( "Could not save state of member %s" , this . name ) , e ) ; } }
Save the state of this member to the key value store .