Package com._1c.g5.v8.xmdb.impl
Class CompactLink
java.lang.Object
com._1c.g5.v8.xmdb.impl.CompactLink
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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final longstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcompactLink(byte[] data) Write data into ling (<=7 byte)static longcompactLink(long startPageIndex, int allocatedPages, boolean extended) Compile compact link fromstatic longstatic final intgetAllocatedPages(long compactLink) static final longgetStartPageIndex(long compactLink) static final booleanisDataInLink(long compactLink) static final booleanisEmptyLink(long compactLink) static final booleanisExtendedInLink(long compactLink) static byte[]unpackLinkData(long compactLink) static ByteBufferunpackLinkData2(long compactLink)
-
Field Details
-
EMPTY_LINK
public static final long EMPTY_LINK- See Also:
-
DATA_IN_LINK
public static final int DATA_IN_LINK- See Also:
-
EXTENDED
public static final int EXTENDED- See Also:
-
LINK_SIZE
public static final int LINK_SIZE- See Also:
-
-
Constructor Details
-
CompactLink
public CompactLink()
-
-
Method Details
-
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
-
compactLink
public static long compactLink(byte[] data) Write data into ling (<=7 byte)- Parameters:
data-- Returns:
-
unpackLinkData
public static byte[] unpackLinkData(long compactLink) -
unpackLinkData2
-
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
-