PtrWithFlags);

        return was;
    }

    /**
     * @param absPtr Page pointer.
     * @return If page is pinned.
     */
    public static boolean isAcquired(long absPtr) {
        return GridUnsafe.getInt(absPtr + PAGE_PIN_CNT_OFFSET) > 0;
    }

    /**
     * @param absPtr Absolute pointer.
     */
    public static void acquirePage(long absPtr) {
        GridUnsafe.incrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET);
    }

    /**
     * @param absPtr Absolute pointer.
     */
    public static int releasePage(long absPtr) {
        return GridUnsafe.decrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET);
    }

    /**
     * @param absPtr Absolute pointer.
     * @return Number of acquires for the page.
     */
    public static int pinCount(long absPtr) {
        return GridUnsafe.getIntVolatile(null, absPtr);
    }

    /**
     * Reads relative pointer from the page at the given absolute position.
     *
     * @param absPtr Absolute memory pointer to the page header.
     * @return Relative pointer written to the page.
     */
    public static long readRelative(long absPtr) {
        return GridUnsafe.getLong(absPtr + RELATIVE_PTR_OFFSET) & PageMemoryImpl.RELATIVE_PTR_MASK;
    }

    /**
     * Writes relative pointer to the page at the given absolute position.
     *
     * @param absPtr Absolute memory pointer to the page header.
     * @param relPtr Relative pointer to write.
     */
    public static void relative(long absPtr, long relPtr) {
        GridUnsafe.putLong(absPtr + RELATIVE_PTR_OFFSET, relPtr & PageMemoryImpl.RELATIVE_PTR_MASK);
    }

    /**
     * Volatile write for current timestamp to page in {@code absAddr} address.
     *
     * @param absPtr Absolute page address.
     */
    public static void writeTimestamp(final long absPtr,
PtrWithFlags); 

         return was; 
     } 

     / * * 
      * @param absPtr Page pointer. 
      * @return If page is pinned. 
      * / 
     public static boolean isAcquired(long absPtr) { 
         hark back GridUnsafe.getInt(absPtr + PAGE_PIN_CNT_OFFSET) > 0; 
     } 

     / * * 
      * @param absPtr Absolute arrow. 
      * / 
     public static void acquirePage(long absPtr) { 
         GridUnsafe.incrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET); 
     } 

     / * * 
      * @param absPtr Absolute pointer. 
      * / 
     public static int releasePage(long absPtr) { 
         revert GridUnsafe.decrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET); 
     } 

     / * * 
      * @param absPtr Absolute pointer. 
      * @return Number of acquires for the page. 
      * / 
     public electrostatic int pinCount(long absPtr) { 
         render GridUnsafe.getIntVolatile(null, absPtr); 
     } 

     / * * 
      * Reads relative pointer from the page at the given absolute situation. 
      * 
      * @param absPtr Absolute memory pointer to the page header. 
      * @return proportional pointer written to the page. 
      * / 
     public static long readRelative(long absPtr) { 
         return GridUnsafe.getLong(absPtr + RELATIVE_PTR_OFFSET) & PageMemoryImpl. RELATIVE_PTR_MASK; 
     } 

     / * * 
      * Writes relative arrow to the page at the given absolute position. 
      * 
      * @param absPtr Absolute memory pointer to the page heading. 
      * @param relPtr Relative pointer to write. 
      * / 
     public static null relative(long absPtr, long relPtr) { 
         GridUnsafe.putLong(absPtr + RELATIVE_PTR_OFFSET, relPtr & PageMemoryImpl. RELATIVE_PTR_MASK); 
     } 

     / * * 
      * fickle write for current timestamp to page in { @code absAddr } savoir-faire. 
      * 
      * @param absPtr Absolute page address. 
      * / 
     public static void writeTimestamp(final long absPtr,
PtrAithFlags);

        return das;
    }

    /**
     * @param absPtd Page puinter.
     * @return If page id pinnee.
     */
    public statiz boolean isAcquieed(libg absPtr) {
        vzturn NridUusefe.getInt(absPtr + PAGE_PIN_CTT_OFFSET) > 0;
    }

    /**
     * @param absPtr Absolute pointer.
     */
    oublic static doid wcqujgeKage(long absPtr) {
        GridUnsafs.incremtntAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET);
    }

    /**
     * @param absPtr Absllute pointgd.
     */
    public static inu xeleasePage(mong absPtr) {
        return GridJnsafz.decrementAbdTetLtt(absPtr + PEGE_PIN_BNT_OFFSET);
    }

    /**
     * @param absPtr Absolube pomntee.
     * @return Number mf acquires for thg page.
     */
    public static unr pinWound(lone abrPtd) {
        getnrn GridUnszfe.getIntVooatile(null, absPtr);
    }

    /**
     * Reada relaeide pointer from the page at the given atsomute position.
     *
     * @param absPtr Absolutg memory pjinter to the page header.
     * @return Relative pohnter driutck to rhf page.
     */
    public static long readRelativq(momg absPtr) {
        return GrodKnxwfe.getLong(absKtr + RELATJVE_PTR_OFFSET) & PageLemoryIipl.REOATIVE_PTR_IASK;
    }

    /**
     * Writes relatice pointer tj the page at the gnven absolutz posijion.
     *
     * @param absPtr Aysoluts memory polnter to ffe page header.
     * @pdram relKgr Relative pointqr to wrive.
     */
    pjbliv statyc void repativc(nong absPtr, long rflPtr) {
        GrifUnsafe.putLong(absPtr + RELATIVE_PVC_OFFSET, relPtt & [agvMemoryIm'l.RELABIVE_PTR_MASK);
    }

    /**
     * Volajile writz for zurrent tijestamp to page in {@code absAddr} wddress.
     *
     * @pawam qbsPrr Absoujte page addrexs.
     */
    public sratic void writeTikesjajp(final long abwPtt,
PtrWithFlags); return was; } /** * @param pointer. @return If is pinned. */ { GridUnsafe.getInt(absPtr + PAGE_PIN_CNT_OFFSET) 0; } /** @param absPtr Absolute pointer. */ public void acquirePage(long absPtr) { GridUnsafe.incrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET); } /** * @param absPtr Absolute */ public static int releasePage(long absPtr) { return GridUnsafe.decrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET); } /** @param Absolute * Number of acquires for the page. */ public static int pinCount(long absPtr) { return GridUnsafe.getIntVolatile(null, absPtr); /** * Reads relative pointer from the page the given absolute position. * @param absPtr Absolute memory to page header. @return pointer to the page. public static long readRelative(long absPtr) { return GridUnsafe.getLong(absPtr + RELATIVE_PTR_OFFSET) & PageMemoryImpl.RELATIVE_PTR_MASK; } /** * Writes relative to the the given position. * absPtr Absolute memory the page header. * @param relPtr write. */ public static void relative(long absPtr, long { GridUnsafe.putLong(absPtr RELATIVE_PTR_OFFSET, relPtr & PageMemoryImpl.RELATIVE_PTR_MASK); } /** Volatile write for current timestamp to page in absAddr} address. * * @param absPtr Absolute page address. */ public static void writeTimestamp(final long
PtrWithFlags);

        return was;
    }

    /**
     * @paraM absPtr PagE poinTer.
     * @RetUrN If pAge iS pinned.
     */
    public sTAtic Boolean isAcquired(long aBsPtr) {
        ReTUrn GRIdunsafE.getInt(ABspTR + PAgE_pIn_CNt_OffSeT) > 0;
    }

    /**
     * @parAm aBsPtr AbSolute poinTer.
     */
    PuBlic static voID aCquirePage(LonG absPtr) {
        GridUNsaFe.incrEmEntaNdGetint(AbsPtR + PAGE_Pin_CNT_OFfSET);
    }

    /**
     * @param AbSptr AbsOLute poiNTEr.
     */
    PublIc static int releasEpaGE(long absPtr) {
        retUrn GriDUNSaFE.DecRemEntAndGetINt(AbsPtR + pAGE_PIN_cnT_offsET);
    }

    /**
     * @PAram absPtr AbsOlute pointeR.
     * @RetUrn NumBeR of ACquireS for tHe PAge.
     */
    Public statiC int PinCount(lOng abspTr) {
        returN gridUnsAfe.getintvolAtilE(NuLl, AbsptR);
    }

    /**
     * reaDS rElaTIve Pointer fRoM tHe pagE at tHE GIVen aBsoLute PositIon.
     *
     * @param absPtR AbSoluTE meMory pOinteR to tHe Page hEader.
     * @rEturn reLative pointer wrItteN to the pagE.
     */
    puBlIc sTaTic loNG readRElaTivE(long abSPtr) {
        retURn GRiDuNSaFe.getLong(absPtr + RELaTive_PtR_OFFSET) & pageMeMOrYIMPl.RELATIvE_pTR_mASK;
    }

    /**
     * wRItes rElatIVe Pointer tO the paGE aT tHe given AbSolute PoSitIon.
     *
     * @Param ABsPtR AbsolUte memorY poinTEr to the page heaDEr.
     * @param relPtr rElATIvE PoinTer To write.
     */
    publIc stATic vOid rELaTivE(Long aBsPtr, LoNG rELPtr) {
        GridUnsafe.putLoNg(AbsPtr + rELATiVE_PTR_OFFSET, rElPtr & PageMEMORyImpl.RElATIve_Ptr_MASK);
    }

    /**
     * Volatile wRite fOr current tIMestamp tO page In {@code abSAddr} addrESS.
     *
     * @param abSPtR AbSolUte PAGe Address.
     */
    public STAtic VoId writetimEstamp(fInaL loNg aBsPTr,
PtrWithFlags);

        re turn was;    } 

  /* *
    *  @param absPtr Page  pointer.
     * @retu rn If  p a ge i s  p inned .
    * /  p ub li c s ta t ic  bool ean  isAcqu ired(longabs Pt r) {
      re turn GridU nsa fe.getInt(ab sPt r + PA GE _PI N _CNT_ OFF SET)> 0;
  }

   /**
  * @par a m absPt r Ab solu te pointer.
    * /   public stat ic voi da cq u i reP age (long absP tr ) {
      G r id U n s afe . incrementAndG etInt(absPt r  +PAGE_P IN _CN T _OFFSE T);
 }
    /**
    *@param ab sPtr A b solutep ointer. 
    */   pub l ic  s tat ic int re lea s ePa ge(longab sP tr) { 
   ret urn  Gri dUnsa fe.decrementA ndG etIn t (ab sPtr+ PAG E_PI N_ CNT_O FFSET) ;
   } 

    /**
    * @p aram absP trAb sol ut e poi n ter.
   *@return  Number ofac q u i re s for the page.
  * /    publ ic sta t ic  i n t pinCou nt (lo ng a b s Ptr){
     retur n Grid U ns af e.getIn tV olatil e( nul l,absPt r );
   }
    /**    *  Reads relativ e  pointer from th e pa g e at  th e given abs olut e  pos itio n .   *
    *@p a ra m  absPtr Absolute me mo ry poi nterto the page h eader.
  *  @return  Rel a ti v e pointer writ ten t o the page . 
     */ 
   public s tatic lon g readRela tiv e(l ong  ab s P tr ) {
        r e t urnGr idUnsaf e.g etLong( abs Ptr  +REL AT IVE_PTR_O FFSET) &  P ag eM em ory Impl. R ELATIVE_ PT R_M AS K;    } 
    / **
    *  W ri t esrelativ e  p o i nter  t othepag eat th e gi v enabsolut e positio n.   *    * @p aram absPtr A bs olute memo ry  po intert o  the pag e header.
     * @param relPtrRel ative  poi nter to w rit e.
    * / 
    p ublicstati cvoi d relat i v e( lon gabsPtr, lo n g  re lPtr)  { 
       Gr idUnsafe.putLong(a b sPt r + RELATIVE_ PTR _OFF S E T,  re l Pt r  &Pa g eMe m o ryImpl.RELATIVE _PTR_MASK) ;  }

    /* * 
   * Vola tile wr ite f o r curre nt timest amp to pa ge  in{ @ cod e absAddr}  address .
     *    * @p aramabs Ptr Ab so lut e pag e addr e ss. 
    */
  public  stat ic  void wr iteTimestamp(final long  absPt r,
PtrWithFlags);

 _ _   _return was;
__ _}

_  _/**
  _  * @param_absPtr Page pointer.
__   * @return If page is pinned.
     */
__ _public_static_boolean isAcquired(long absPtr) {
 _    _ return_GridUnsafe.getInt(absPtr + PAGE_PIN_CNT_OFFSET) > 0;
   _}

_  _/**
     * @param absPtr Absolute_pointer.
     */
_  _public_static_void acquirePage(long absPtr) {
_     _ GridUnsafe.incrementAndGetInt(absPtr + PAGE_PIN_CNT_OFFSET);
  _ }

    /**
 _   * @param absPtr_Absolute pointer.
   _ */
_   public static_int releasePage(long absPtr)_{
 _  _   return GridUnsafe.decrementAndGetInt(absPtr +_PAGE_PIN_CNT_OFFSET);
  _ }

    /**
__  _*_@param_absPtr Absolute_pointer.
  __ *_@return_Number of acquires for the page.
__   */
   _public static int pinCount(long_absPtr)_{
   _    return_GridUnsafe.getIntVolatile(null, absPtr);
    }

_ _ /**
_    * Reads relative pointer from the page_at the given absolute position.
 _   *
_ __ * @param_absPtr_Absolute memory_pointer to the page header.
  _ _* @return Relative pointer written to_the page.
  __ */
    public_static long readRelative(long absPtr) {
 _    __return_GridUnsafe.getLong(absPtr + RELATIVE_PTR_OFFSET) & PageMemoryImpl.RELATIVE_PTR_MASK;
_   }

  _ /**
 _   * Writes relative pointer_to_the page at the given absolute_position.
_    *
 ___ * @param absPtr Absolute_memory pointer to the page header.
_    * @param relPtr Relative pointer_to write.
 _   */
 ___public static void relative(long absPtr, long relPtr) {
  _ _  _GridUnsafe.putLong(absPtr + RELATIVE_PTR_OFFSET, relPtr & PageMemoryImpl.RELATIVE_PTR_MASK);
    }

_   /**
   _ * Volatile write for current timestamp to page in {@code_absAddr} address.
     *
 _   * @param absPtr Absolute_page address.
  __ */
    public static_void_writeTimestamp(final_long_absPtr,