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 int
static final long
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic long
compactLink
(byte[] data) Write data into ling (<=7 byte)static long
compactLink
(long startPageIndex, int allocatedPages, boolean extended) Compile compact link fromstatic long
static final int
getAllocatedPages
(long compactLink) static final long
getStartPageIndex
(long compactLink) static final boolean
isDataInLink
(long compactLink) static final boolean
isEmptyLink
(long compactLink) static final boolean
isExtendedInLink
(long compactLink) static byte[]
unpackLinkData
(long compactLink) static ByteBuffer
unpackLinkData2
(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
-