Package one.microstream.storage.types
Interface StorageChannelCountProvider
-
- All Superinterfaces:
_intReference
- All Known Implementing Classes:
StorageChannelCountProvider.Default
public interface StorageChannelCountProvider extends _intReference
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classStorageChannelCountProvider.Defaultstatic interfaceStorageChannelCountProvider.Defaults
-
Method Summary
Modifier and Type Method Description intget()static booleanisValidChannelCount(int channelCount)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 Detail
-
get
int get()
- Specified by:
getin interface_intReference
-
isValidChannelCount
static boolean isValidChannelCount(int channelCount)
-
validateChannelCount
static int validateChannelCount(int channelCount) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
New
static StorageChannelCountProvider 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
static StorageChannelCountProvider New(int channelCount)
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.Defaults.defaultHighestSaneChannelCount()- See Also:
New(),StorageChannelCountProvider.Defaults
-
-