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 class
StorageChannelCountProvider.Default
static interface
StorageChannelCountProvider.Defaults
-
Method Summary
Modifier and Type Method Description int
get()
static boolean
isValidChannelCount(int channelCount)
static StorageChannelCountProvider
New()
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using default values defined byStorageChannelCountProvider.Defaults
.static StorageChannelCountProvider
New(int channelCount)
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using the passed value.static int
validateChannelCount(int channelCount)
-
-
-
Method Detail
-
get
int get()
- Specified by:
get
in 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 newStorageChannelCountProvider
instance using default values defined byStorageChannelCountProvider.Defaults
.For explanations and customizing values, see
New(int)
.- Returns:
- a new
StorageChannelCountProvider
instance. - See Also:
New(int)
,StorageChannelCountProvider.Defaults
-
New
static StorageChannelCountProvider New(int channelCount)
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using the passed value.A "channel" is the combination of exclusive storage
Thread
maintaining 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
StorageChannelCountProvider
instance. - Throws:
IllegalArgumentException
- if the passed value is higher than the value returned byStorageChannelCountProvider.Defaults.defaultHighestSaneChannelCount()
- See Also:
New()
,StorageChannelCountProvider.Defaults
-
-