Class CompactLink


  • public class CompactLink
    extends Object
    Compact link library. Compact link - link with 8 bytes: - 24 bit - allocated space in pages, - 36 bit - start page index - 4 bit - flags
    • Constructor Detail

      • CompactLink

        public CompactLink()
    • Method Detail

      • getStartPageIndex

        public static final long getStartPageIndex​(long compactLink)
      • getAllocatedPages

        public static final int getAllocatedPages​(long compactLink)
      • isDataInLink

        public static final boolean isDataInLink​(long compactLink)
      • isExtendedInLink

        public static final boolean isExtendedInLink​(long compactLink)
      • isEmptyLink

        public static final boolean isEmptyLink​(long compactLink)
      • compactLink

        public static long compactLink​(ByteBuffer bb)
      • compactLink

        public static long compactLink​(byte[] data)
        Write data into ling (<=7 byte)
        Parameters:
        data -
        Returns:
      • unpackLinkData

        public static byte[] unpackLinkData​(long compactLink)
      • unpackLinkData2

        public static ByteBuffer unpackLinkData2​(long compactLink)
      • compactLink

        public static long compactLink​(long startPageIndex,
                                       int allocatedPages,
                                       boolean extended)
        Compile compact link from
        Parameters:
        startPageIndex - start page index
        allocatedPages - allocated pages
        requiredBytes - required bytes
        extended - flag - has next record of data block
        Returns:
        clink