@ConfigurationProperties(prefix="throttling", ignoreUnknownFields=false) public class ThrottlingProperties extends Object
Configuration properties that control throttling of statements that are
executed by the Cassandra database. These properties allow to specify how
many statements are executed concurrently, thus providing a protection
against overloading the database cluster. This object is injected with
properties that have the throttling.*
prefix.
Instances of this class are safe for concurrent read access but are not safe for concurrent write access. Typically, this should not be a problem because an instance of this class is initialized once at application startup and then only used for read access.
Constructor and Description |
---|
ThrottlingProperties()
Creates a properties object, initializing all properties with their
default values.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxConcurrentChannelMetaDataReadStatements()
Returns the maximum number of read statements that may be concurrently
executed by the
ChannelMetaDataDAO . |
int |
getMaxConcurrentChannelMetaDataWriteStatements()
Returns the maximum number of write statements that may be concurrently
executed by the
ChannelMetaDataDAO . |
int |
getMaxConcurrentControlSystemSupportReadStatements()
Returns the maximum number of read statements that may be concurrently
executed by all
ControlSystemSupport s. |
int |
getMaxConcurrentControlSystemSupportWriteStatements()
Returns the maximum number of write statements that may be concurrently
executed by all
ControlSystemSupport s. |
void |
setMaxConcurrentChannelMetaDataReadStatements(int maxConcurrentChannelMetaDataReadStatements)
Sets the maximum number of read statements that may be concurrently
executed by the
ChannelMetaDataDAO . |
void |
setMaxConcurrentChannelMetaDataWriteStatements(int maxConcurrentChannelMetaDataWriteStatements)
Sets the maximum number of write statements that may be concurrently
executed by the
ChannelMetaDataDAO . |
void |
setMaxConcurrentControlSystemSupportReadStatements(int maxConcurrentControlSystemSupportReadStatements)
Sets the maximum number of read statements that may be concurrently
executed by all
ControlSystemSupport s. |
void |
setMaxConcurrentControlSystemSupportWriteStatements(int maxConcurrentControlSystemSupportWriteStatements)
Sets the maximum number of write statements that may be concurrently
executed by all
ControlSystemSupport s. |
public ThrottlingProperties()
public int getMaxConcurrentChannelMetaDataReadStatements()
ChannelMetaDataDAO
. Typically, these are read
statements that load a channel configuration or information object or
that look for pending channel operations. The default value is 64.ChannelMetaDataDAO
.public void setMaxConcurrentChannelMetaDataReadStatements(int maxConcurrentChannelMetaDataReadStatements)
ChannelMetaDataDAO
. Typically, these are read
statements that load a channel configuration or information object or
that look for pending channel operations. The default value is 64.maxConcurrentChannelMetaDataReadStatements
- maximum number of concurrently running read statements allowed
for the ChannelMetaDataDAO
. Must be greater than
zero.IllegalArgumentException
- if the specified value is less than one.public int getMaxConcurrentChannelMetaDataWriteStatements()
ChannelMetaDataDAO
. Typically, these are write
statements that modify a channel configuration and information object or
that add or remove pending channel operations. These write statements
typically are logged batch statements or light-weight transactions, so
they are significantly more expensive than regular write statements. The
default value is 16.ChannelMetaDataDAO
.public void setMaxConcurrentChannelMetaDataWriteStatements(int maxConcurrentChannelMetaDataWriteStatements)
ChannelMetaDataDAO
. Typically, these are write
statements that modify a channel configuration and information object or
that add or remove pending channel operations. These write statements
typically are logged batch statements or light-weight transactions, so
they are significantly more expensive than regular write statements. The
default value is 16.maxConcurrentChannelMetaDataWriteStatements
- maximum number of concurrently running write statements
allowed for the ChannelMetaDataDAO
. Must be
greater than zero.IllegalArgumentException
- if the specified value is less than one.public int getMaxConcurrentControlSystemSupportReadStatements()
ControlSystemSupport
s. Typically, these are read
statements that read samples from a sample bucket. All
ControlSystemSupport
s share the same session and thus all
their statements contribute towards reaching this limit. The default
value is 128.ControlSystemSupport
s.public void setMaxConcurrentControlSystemSupportReadStatements(int maxConcurrentControlSystemSupportReadStatements)
ControlSystemSupport
s. Typically, these are read
statements that read samples from a sample bucket. All
ControlSystemSupport
s share the same session and thus all
their statements contribute towards reaching this limit. The default
value is 128.maxConcurrentControlSystemSupportReadStatements
- maximum number of concurrently running read statements allowed
for all ControlSystemSupport
s.IllegalArgumentException
- if the specified value is less than one.public int getMaxConcurrentControlSystemSupportWriteStatements()
ControlSystemSupport
s. Typically, these are write
statements that write a single sample to a sample bucket, which means
that this kind of statements is rather cheap. All
ControlSystemSupport
s share the same session and thus all
their statements contribute towards reaching this limit. The default
value is 512.ControlSystemSupport
s.public void setMaxConcurrentControlSystemSupportWriteStatements(int maxConcurrentControlSystemSupportWriteStatements)
ControlSystemSupport
s. Typically, these are write
statements that write a single sample to a sample bucket, which means
that this kind of statements is rather cheap. All
ControlSystemSupport
s share the same session and thus all
their statements contribute towards reaching this limit. The default
value is 512.maxConcurrentControlSystemSupportWriteStatements
- maximum number of concurrently running write statements
allowed for all ControlSystemSupport
s.IllegalArgumentException
- if the specified value is less than one.Copyright © 2011–2017 aquenos GmbH. All rights reserved.