Package com._1c.g5.v8.xmdb
Interface TransactionalKVS<K,V>
-
- All Superinterfaces:
KeyValueStorage<K,V>
- All Known Implementing Classes:
TransactionalKVSImpl
public interface TransactionalKVS<K,V> extends KeyValueStorage<K,V>
Wrapper around standart KeyValueStorage with transactional features (merge, commit, rollback)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
commit()
Commit changes from last merge operationint
getMergeRebuildBorder()
Get merge rebuild border.KeyValueStorage<K,V>
getPrimaryStorage()
Get base indexvoid
merge(KeyValueStorage<K,V> updates)
Merge updates into base index If updates contain entry with empty (=null) value - key will be removed from base indexvoid
merge(Map<K,V> updates)
Merge updates into base index If updates contain entry with empty (=null) value - key will be removed from base indexvoid
mergeCommit(KeyValueStorage<K,V> updates)
Merge&commit updates - fastest, but less integrity safe method to bulk update indexvoid
mergeCommit(Map<K,V> updates)
merge&commit updates - fastest, but less integrity safe method to bulk update indexvoid
rollback()
Rollback changes from last uncommited merge operationvoid
setMergeRebuildBorder(int mergeRebuildBorder)
Set merge rebuild border (see getMergeRebuildBorder)
-
-
-
Method Detail
-
merge
void merge(KeyValueStorage<K,V> updates)
Merge updates into base index If updates contain entry with empty (=null) value - key will be removed from base index- Parameters:
updates
- updates to merge
-
merge
void merge(Map<K,V> updates)
Merge updates into base index If updates contain entry with empty (=null) value - key will be removed from base index- Parameters:
updates
- updates to merge
-
rollback
void rollback() throws DBException
Rollback changes from last uncommited merge operation- Throws:
DBException
-
commit
void commit() throws DBException
Commit changes from last merge operation- Throws:
DBException
-
getPrimaryStorage
KeyValueStorage<K,V> getPrimaryStorage()
Get base index- Returns:
- KeyValueStorage
-
getMergeRebuildBorder
int getMergeRebuildBorder()
Get merge rebuild border. Value (in percent) show how many updates need to full rebuild of base index. If updates have less size - it will be merge by simple put into base index (on mergeCommit method) or base index clone (on merge method)- Returns:
- merge rebuld border
-
setMergeRebuildBorder
void setMergeRebuildBorder(int mergeRebuildBorder)
Set merge rebuild border (see getMergeRebuildBorder)- Parameters:
mergeRebuildBorder
- merge rebuild border
-
mergeCommit
void mergeCommit(KeyValueStorage<K,V> updates)
Merge&commit updates - fastest, but less integrity safe method to bulk update index- Parameters:
updates
- updates
-
-