Package com._1c.g5.v8.xmdb.impl
Class CompactLink
- java.lang.Object
-
- com._1c.g5.v8.xmdb.impl.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
-
-
Field Summary
Fields Modifier and Type Field Description static intDATA_IN_LINKstatic longEMPTY_LINKstatic intEXTENDEDstatic intLINK_SIZE
-
Constructor Summary
Constructors Constructor Description CompactLink()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longcompactLink(byte[] data)Write data into ling (<=7 byte)static longcompactLink(long startPageIndex, int allocatedPages, boolean extended)Compile compact link fromstatic longcompactLink(ByteBuffer bb)static intgetAllocatedPages(long compactLink)static longgetStartPageIndex(long compactLink)static booleanisDataInLink(long compactLink)static booleanisEmptyLink(long compactLink)static booleanisExtendedInLink(long compactLink)static byte[]unpackLinkData(long compactLink)static ByteBufferunpackLinkData2(long compactLink)
-
-
-
Field Detail
-
EMPTY_LINK
public static final long EMPTY_LINK
- See Also:
- Constant Field Values
-
DATA_IN_LINK
public static final int DATA_IN_LINK
- See Also:
- Constant Field Values
-
EXTENDED
public static final int EXTENDED
- See Also:
- Constant Field Values
-
LINK_SIZE
public static final int LINK_SIZE
- See Also:
- Constant Field Values
-
-
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 indexallocatedPages- allocated pagesrequiredBytes- required bytesextended- flag - has next record of data block- Returns:
- clink
-
-