public interface QueueConfig extends Config
Queues may be configured both server side and client side (if required).
Queue properties can not be changed on the server side once the server has started. On the client side changing properties of a queue definition once it has been used will have no effect so all queue configuration should be done before creating any connection.
Modifier and Type | Method and Description |
---|---|
boolean |
conflates()
Gets the value of the conflates property.
|
int |
getLowerThreshold()
Gets the lower threshold.
|
int |
getMaximumDepth()
Gets the maximum queue depth.
|
String |
getName()
Gets the queue definition name.
|
int |
getUpperThreshold()
Gets the upper threshold.
|
void |
setConflates(boolean conflates)
Sets the conflates property.
|
void |
setLowerThreshold(int threshold)
Sets the lower threshold.
|
void |
setMaximumDepth(int maximumDepth)
Sets the maximum queue depth.
|
void |
setUpperThreshold(int threshold)
Sets the upper threshold.
|
String getName()
void setMaximumDepth(int maximumDepth) throws ConfigException
This indicates the maximum depth of the queue. If this limit is reached then the connection would be terminated.
If not specified then this is assumed to be 1000.
maximumDepth
- the maximum queue depth, must be positiveConfigException
- if the property can not be setint getMaximumDepth()
void setConflates(boolean conflates) throws ConfigException
Indicates whether conflation should be automatically turned on for the user of the queue definition. Currently this only has an effect on the server side for client connections. If conflation is on then messages queued for Topics that have conflation policies specified will be conflated.
By default this is false.
conflates
- true if the queue should conflateConfigException
- if unable to set the conflates propertyConflationConfig
boolean conflates()
void setUpperThreshold(int threshold) throws ConfigException
When the upper percentage of the queue reached, any queue listeners will be notified. This currently only has an effect server side.
By default the upper threshold will not be notified.
threshold
- the upper threshold percentage. A value of -1 means that
upper threshold will not be notified otherwise the value must be
in the range 1 to 100 and greater than the lower threshold.ConfigException
- if the property can not be setint getUpperThreshold()
void setLowerThreshold(int threshold) throws ConfigException
After an upper threshold event has occurred then this specifies the percentage queue size at which listeners for queue threshold notifications will be notified.
This only has an effect when used in conjunction with the upper threshold.
By default no lower threshold notification would occur.
threshold
- the lower threshold percentage. A value of -1 means that
lower threshold will not be notified otherwise the value must be
in the range 0 to 100 and less than the upper threshold.ConfigException
- if the property can not be setint getLowerThreshold()
Copyright © 2016 Push Technology Ltd. All Rights Reserved.