Package com._1c.g5.v8.bm.store
Class BmStores
- java.lang.Object
-
- com._1c.g5.v8.bm.store.BmStores
-
public final class BmStores extends Object
Factory methods for stores.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IBmPersistentLongStore
createLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold)
Creates a log-structured file store with long keys.static IBmPersistentLongStore
createLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a log-structured file store with long keys.static IBmPersistentLongStore
createMemoryMappedLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold)
Creates a memory-mapped log-structured file store with long keys.static IBmPersistentLongStore
createMemoryMappedLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a memory-mapped log-structured file store with long keys.static <K> IBmPersistentObjectKeyStore<K>
createObjectKeyLogStructuredFileStore(IBmSerializer<K> keySerializer, Path path, int fileSizeCompactionThreshold)
Creates a log-structured file store with particular object type keys.static <K> IBmPersistentObjectKeyStore<K>
createObjectKeyLogStructuredFileStore(IBmSerializer<K> keySerializer, Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a log-structured file store with particular object type keys.static IBmPersistentStringStore
createStringLogStructuredFileStore(Path path, int fileSizeCompactionThreshold)
Creates a log-structured file store with string keys.static IBmPersistentStringStore
createStringLogStructuredFileStore(Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a log-structured file store with string keys.static IBmPersistentStringRegistry
createStringRegistry(Path path)
Creates a persistent string registry.static IBmPersistentStringRegistry
createStringRegistry(Path path, int maxAllowedId)
Creates a persistent string registry.static IBmWorkLog
createWorkLog(Path path, long sizeThreshold)
Creates a work log.
-
-
-
Method Detail
-
createLongLogStructuredFileStore
public static IBmPersistentLongStore createLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold)
Creates a log-structured file store with long keys.- Parameters:
path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createLongLogStructuredFileStore
public static IBmPersistentLongStore createLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a log-structured file store with long keys.- Parameters:
path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.wastePercentageCompactionThreshold
- The waste percentage that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createMemoryMappedLongLogStructuredFileStore
public static IBmPersistentLongStore createMemoryMappedLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold)
Creates a memory-mapped log-structured file store with long keys.- Parameters:
path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createMemoryMappedLongLogStructuredFileStore
public static IBmPersistentLongStore createMemoryMappedLongLogStructuredFileStore(Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a memory-mapped log-structured file store with long keys.- Parameters:
path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.wastePercentageCompactionThreshold
- The waste percentage that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createStringLogStructuredFileStore
public static IBmPersistentStringStore createStringLogStructuredFileStore(Path path, int fileSizeCompactionThreshold)
Creates a log-structured file store with string keys.- Parameters:
path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createStringLogStructuredFileStore
public static IBmPersistentStringStore createStringLogStructuredFileStore(Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a log-structured file store with string keys.- Parameters:
path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.wastePercentageCompactionThreshold
- The waste percentage that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createObjectKeyLogStructuredFileStore
public static <K> IBmPersistentObjectKeyStore<K> createObjectKeyLogStructuredFileStore(IBmSerializer<K> keySerializer, Path path, int fileSizeCompactionThreshold)
Creates a log-structured file store with particular object type keys.- Type Parameters:
K
- The store key type.- Parameters:
keySerializer
- The key serializer. May not benull
.path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createObjectKeyLogStructuredFileStore
public static <K> IBmPersistentObjectKeyStore<K> createObjectKeyLogStructuredFileStore(IBmSerializer<K> keySerializer, Path path, int fileSizeCompactionThreshold, int wastePercentageCompactionThreshold)
Creates a log-structured file store with particular object type keys.- Type Parameters:
K
- The store key type.- Parameters:
keySerializer
- The key serializer. May not benull
.path
- The path of the file to store data. May not benull
.fileSizeCompactionThreshold
- The file size in bytes that when exceeded may trigger data compaction. Must be greater than0
.wastePercentageCompactionThreshold
- The waste percentage that when exceeded may trigger data compaction. Must be greater than0
.- Returns:
- the created store, never
null
.
-
createStringRegistry
public static IBmPersistentStringRegistry createStringRegistry(Path path) throws IOException
Creates a persistent string registry.- Parameters:
path
- The path of the file to store data. May not benull
.- Returns:
- the created registry, never
null
. - Throws:
IOException
- if any I/O error occurs.
-
createStringRegistry
public static IBmPersistentStringRegistry createStringRegistry(Path path, int maxAllowedId) throws IOException
Creates a persistent string registry.- Parameters:
path
- The path of the file to store data. May not benull
.maxAllowedId
- The maximum allowed ID. Must be greater than0
.- Returns:
- the created registry, never
null
. - Throws:
IOException
- if any I/O error occurs.
-
createWorkLog
public static IBmWorkLog createWorkLog(Path path, long sizeThreshold) throws IOException
Creates a work log.- Parameters:
path
- The path of the file to store data. May not benull
.sizeThreshold
- The size threshold. Must be greater than0
.- Returns:
- the created work log, never
null
. - Throws:
IOException
- if any I/O error occurs.
-
-