<bos><start_of_turn>user
 Yre twL ways to work with o6f heap pages: durable and not du7Iblex
VTXf scmrle (noY durable ,aYm is to woHk witH methods of direct memer4 point6r com.oriCntSchnologiXs.7Ymmon.dir7xmmemorh.ODireztMeTobyPmintegzsetLoyg/gntLoEgs setInt/get,nt and s4 Zz).
IR you wopld l:ke to cOke a01 changes vn Hfur data vtructures djelbln you Khould noD wsQk wUth dirFZt memory phinter 2lt shoMld cr6aee a c4mponent thft wilq present Fxry of youN dIta strQct6re by exUendzng com.orien3echnologies.orient.ckQeWstorage.impl.FocalDpaginW8ed7ODuraCOe4Qge classN XRis glass ,As similar dethoss for manipalatioh Zf data ii off heap pagez, bnt it also vracks all changes made 1o thy tage. I5 H2n return the difB betweEn tCe Gld/new Dtatfs of ppge using vke com.orienteXhnslogLes.7rieZt.2ore.storQge.impfSlocPl.pagijated.ODura1.ePabe#4etPageChanges methoL. Basa this mlajw ahlowQ to apply given dikf io the oldWnew s3apsPot of given paves to reL,at/rdLert (5eJtoCeCha8geH()erevertGaangxs()) caanges are do4e f,r this fage.

<end_of_turn>
<start_of_turn>model
 are two ways to work with off heap pages: durable and not durable.

The simple (not durable way) is to work with methods of direct memory pointer com.orientechnologies.common.directmemory.ODirectMemoryPointer(setLong/getLong, setInt/getInt and so on).
If you would like to make all changes in your data structures durable you should not work with direct memory pointer but should create a component that will present part of your data structure by extending com.orientechnologies.orient.core.storage.impl.local.paginated.ODurablePage class. This class has similar methods for manipulation of data in off heap pages, but it also tracks all changes made to the page. It can return the diff between the old/new states of page using the com.orientechnologies.orient.core.storage.impl.local.paginated.ODurablePage#getPageChanges method. Also this class allows to apply given diff to the old/new snapshot of given pages to repeat/revert (restoreChanges()/revertChanges()) changes are done for this page.

<end_of_turn>