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 int
DATA_IN_LINK
static long
EMPTY_LINK
static int
EXTENDED
static int
LINK_SIZE
-
Constructor Summary
Constructors Constructor Description CompactLink()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
compactLink(byte[] data)
Write data into ling (<=7 byte)static long
compactLink(long startPageIndex, int allocatedPages, boolean extended)
Compile compact link fromstatic long
compactLink(ByteBuffer bb)
static int
getAllocatedPages(long compactLink)
static long
getStartPageIndex(long compactLink)
static boolean
isDataInLink(long compactLink)
static boolean
isEmptyLink(long compactLink)
static boolean
isExtendedInLink(long compactLink)
static byte[]
unpackLinkData(long compactLink)
static ByteBuffer
unpackLinkData2(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
-
-