Package one.microstream.storage.types
Interface StorageChannelCountProvider
- All Superinterfaces:
BinaryChannelCountProvider
- All Known Implementing Classes:
StorageChannelCountProvider.Default
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface StorageChannelCountProvider extends BinaryChannelCountProvider
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classStorageChannelCountProvider.Defaultstatic interfaceStorageChannelCountProvider.Defaultsstatic interfaceStorageChannelCountProvider.Validation -
Method Summary
Modifier and Type Method Description intgetChannelCount()static StorageChannelCountProviderNew()Pseudo-constructor method to create a newStorageChannelCountProviderinstance using default values defined byStorageChannelCountProvider.Defaults.static StorageChannelCountProviderNew(int channelCount)Pseudo-constructor method to create a newStorageChannelCountProviderinstance using the passed value.static intvalidateChannelCount(int channelCount)
-
Method Details
-
getChannelCount
int getChannelCount()- Specified by:
getChannelCountin interfaceBinaryChannelCountProvider
-
validateChannelCount
- Throws:
IllegalArgumentException
-
New
Pseudo-constructor method to create a newStorageChannelCountProviderinstance using default values defined byStorageChannelCountProvider.Defaults.For explanations and customizing values, see
New(int).- Returns:
- a new
StorageChannelCountProviderinstance. - See Also:
New(int),StorageChannelCountProvider.Defaults
-
New
Pseudo-constructor method to create a newStorageChannelCountProviderinstance using the passed value.A "channel" is the combination of exclusive storage
Threadmaintaining an entity registry, data cache, and the like and a storage directory containing storage data files exclusively used by that thread.
The more channels there are, the more parallel loading and storing operations will be executed and the faster the application will become, provided a hardware that can effectively execute that many threads.Since channels use bitwise modulo hashing, the number of channels must always be a 2^n number with n greater than or equal 0.
(Meaning 1, 2, 4, 8, 16, etc.)- Parameters:
channelCount- the number of channels. Must be a 2^n number with n greater than or equal 0.- Returns:
- a new
StorageChannelCountProviderinstance. - Throws:
IllegalArgumentException- if the passed value is higher than the value returned byStorageChannelCountProvider.Validation.maximumChannelCount()- See Also:
New(),StorageChannelCountProvider.Defaults
-