Package com._1c.g5.v8.xmdb
Class IndexBuilder
- java.lang.Object
-
- com._1c.g5.v8.xmdb.IndexBuilder
-
public class IndexBuilder extends Object
Class to create/load indexes
-
-
Constructor Summary
Constructors Constructor Description IndexBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyValueStorage<?,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
getBuilder()
Return index bulder with default parametersIndexBuilder
setMergeSeparator(int mergeSeparator)
Set merge separatorIndexBuilder
setPreallocateFreeSpace(int preallocateFreeSpace)
Set preallocated space size (in bytes)IndexBuilder
setSplitSeparator(int splitSeparator)
Set split separatorIndexBuilder
setT(int t)
Set T - with of BTree nodesIndexBuilder
setThreadSafe(boolean threadSafe)
Set thread safe in index levelIndexBuilder
setValInLeaf(boolean valInLeaf)
Set value in leaf flagIndexBuilder
setValType(byte valType)
Set value typestatic TransactionalKVS<?,byte[]>
wrapTransactional(KeyValueStorage<?,byte[]> kvs, Database database, String name)
Wrap existed index to add transactional features
-
-
-
Method Detail
-
getBuilder
public static IndexBuilder getBuilder()
Return index bulder with default parameters- Returns:
- index builder
-
setValInLeaf
public IndexBuilder setValInLeaf(boolean valInLeaf)
Set value in leaf flag- Parameters:
valInLeaf
- value in leaf flag- Returns:
- current object to chaining
-
setSplitSeparator
public IndexBuilder setSplitSeparator(int splitSeparator)
Set split separator- Parameters:
splitSeparator
- split separator- Returns:
- current object to chaining
-
setMergeSeparator
public IndexBuilder setMergeSeparator(int mergeSeparator)
Set merge separator- Parameters:
mergeSeparator
- merge separator- Returns:
- current object to chaining
-
setT
public IndexBuilder setT(int t)
Set T - with of BTree nodes- Parameters:
t
- with of BTree nodes- Returns:
- current object to chaining
-
setPreallocateFreeSpace
public IndexBuilder setPreallocateFreeSpace(int preallocateFreeSpace)
Set preallocated space size (in bytes)- Parameters:
preallocateFreeSpace
- preallocated space size- Returns:
- current object to chaining
-
setThreadSafe
public IndexBuilder setThreadSafe(boolean threadSafe)
Set thread safe in index level- Parameters:
threadSafe
- thread safe flag- Returns:
- current object to chaining
-
setValType
public IndexBuilder setValType(byte valType)
Set value type- Parameters:
valType
- value type- Returns:
- current object to chaining
-
buildIndex
public KeyValueStorage<?,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.- 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
-
-