Random access to Location in Journal based on some id

30 views
Skip to first unread message

jszczepa...@gmail.com

unread,
Sep 23, 2013, 3:35:03 PM9/23/13
to jour...@googlegroups.com
Hi,
reading the API I can only found ways to access Journal by redo / undo in loop. Is it possible to access some specific location based on some id of the Location? 
Thanks in advance
Jarek

Sergio Bossa

unread,
Sep 24, 2013, 5:09:17 AM9/24/13
to jour...@googlegroups.com
Hi Jarek,

You can definitely build a Location object with the file id and
pointer id you want to access and use the Journal#read method.
Otherwise, yo can persist the Location object returned from
Journal#write and reuse it whenever you want, as it's guaranteed to be
always valid (unless you delete the location itself).

Hope that helps.
Cheers,

Sergio B.
> --
> You received this message because you are subscribed to the Google Groups
> "Journal.IO" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to journalio+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Sergio Bossa
http://www.linkedin.com/in/sergiob
Reply all
Reply to author
Forward
0 new messages