Package com._1c.g5.v8.xmdb
Class IndexBuilder
java.lang.Object
com._1c.g5.v8.xmdb.IndexBuilder
Class to create/load indexes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionKeyValueStorage<?,
byte[]> buildIndex
(Database db, String name) Build index with current index builder state parameters on specified database with specified name If index with same name already in specified database - it will be overrided.static IndexBuilder
Return index bulder with default parameterssetMergeSeparator
(int mergeSeparator) Set merge separatorsetPreallocateFreeSpace
(int preallocateFreeSpace) Set preallocated space size (in bytes)setSplitSeparator
(int splitSeparator) Set split separatorsetT
(int t) Set T - with of BTree nodessetThreadSafe
(boolean threadSafe) Set thread safe in index levelsetValInLeaf
(boolean valInLeaf) Set value in leaf flagsetValType
(byte valType) Set value typestatic final TransactionalKVS<?,
byte[]> wrapTransactional
(KeyValueStorage<?, byte[]> kvs, Database database, String name) Wrap existed index to add transactional features
-
Constructor Details
-
IndexBuilder
public IndexBuilder()
-
-
Method Details
-
getBuilder
Return index bulder with default parameters- Returns:
- index builder
-
setValInLeaf
Set value in leaf flag- Parameters:
valInLeaf
- value in leaf flag- Returns:
- current object to chaining
-
setSplitSeparator
Set split separator- Parameters:
splitSeparator
- split separator- Returns:
- current object to chaining
-
setMergeSeparator
Set merge separator- Parameters:
mergeSeparator
- merge separator- Returns:
- current object to chaining
-
setT
Set T - with of BTree nodes- Parameters:
t
- with of BTree nodes- Returns:
- current object to chaining
-
setPreallocateFreeSpace
Set preallocated space size (in bytes)- Parameters:
preallocateFreeSpace
- preallocated space size- Returns:
- current object to chaining
-
setThreadSafe
Set thread safe in index level- Parameters:
threadSafe
- thread safe flag- Returns:
- current object to chaining
-
setValType
Set value type- Parameters:
valType
- value type- Returns:
- current object to chaining
-
buildIndex
Build index with current index builder state parameters on specified database with specified name If index with same name already in specified database - it will be overrided.- Parameters:
db
- database where index should be createdname
- index name- Returns:
- new index
-
wrapTransactional
public static final TransactionalKVS<?,byte[]> wrapTransactional(KeyValueStorage<?, byte[]> kvs, Database database, String name) Wrap existed index to add transactional features- Parameters:
kvs
- index to wrapdatabase
- database where kvs index placedname
- name of kvs index- Returns:
- transactional wrapper of kvs index
-