Class ConfigurationRuntimeThreading
java.lang.Object
com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeThreading
- All Implemented Interfaces:
Serializable
Holds threading settings.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the blocking strategy to use when multiple threads deliver results for a single statement to consuming statements of an insert-into, and the guarantee of order of delivery must be maintained.long
Returns the number of milliseconds that a thread may maximally be blocking to deliver statement results from a producing statement that employs insert-into to a consuming statement.long
Returns the millisecond resolution of the internal timer thread.Returns the blocking strategy to use when multiple threads deliver results for a single statement to listeners, and the guarantee of order of delivery must be maintained.long
Returns the timeout in millisecond to wait for listener code to complete before dispatching the next result, if dispatch order is preservedReturns the locking strategy value for named window dispatches to named window consumers (default is spin).long
Returns the timeout millisecond value for named window dispatches to named window consumers.Returns the capacity of the inbound execution queue, or null if none defined (the unbounded case, default).int
Returns the number of thread in the inbound threading pool.Returns the capacity of the outbound queue, or null if none defined (the unbounded case, default).int
Returns the number of thread in the outbound threading pool.Returns the capacity of the route execution queue, or null if none defined (the unbounded case, default).int
Returns the number of thread in the route execution thread pool.Returns the capacity of the timer execution queue, or null if none defined (the unbounded case, default).int
Returns the number of thread in the timer execution threading pool.boolean
Returns true to indicate preserve order for inter-statement insert-into, or false to indicate not to preserve orderboolean
Returns true if internal timer is enabled (the default), or false for internal timer disabled.boolean
Returns true to indicate preserve order for dispatch to listeners, or false to indicate not to preserve orderboolean
In multithreaded environments, this setting controls whether named window dispatches to named window consumers preserve the order of events inserted and removed such that statements that consume a named windows delta stream behave deterministic (true by default).boolean
Returns true if the runtime-level lock is configured as a fair lock (default is false).boolean
Returns true for inbound threading enabled, the default is false for not enabled.boolean
Returns true for outbound threading enabled, the default is false for not enabled.boolean
Returns true for route execution threading enabled, the default is false for not enabled.boolean
Returns true for timer execution threading enabled, the default is false for not enabled.void
setInsertIntoDispatchLocking
(Locking insertIntoDispatchLocking) Sets the blocking strategy to use when multiple threads deliver results for a single statement to consuming statements of an insert-into, and the guarantee of order of delivery must be maintained.void
setInsertIntoDispatchPreserveOrder
(boolean value) In multithreaded environments, this setting controls whether insert-into streams preserve the order of events inserted into them by one or more statements such that statements that consume other statement's events behave deterministicvoid
setInsertIntoDispatchTimeout
(long msecTimeout) Sets the number of milliseconds that a thread may maximally be blocking to deliver statement results from a producing statement that employs insert-into to a consuming statement.void
setInternalTimerEnabled
(boolean internalTimerEnabled) Sets the use of internal timer.void
setInternalTimerMsecResolution
(long internalTimerMsecResolution) Sets the length of the interval (resolution) of the timer thread.void
setListenerDispatchLocking
(Locking listenerDispatchLocking) Sets the blocking strategy to use when multiple threads deliver results for a single statement to listeners, and the guarantee of order of delivery must be maintained.void
setListenerDispatchPreserveOrder
(boolean value) In multithreaded environments, this setting controls whether dispatches to listeners preserve the ordering in which the statement processes events.void
setListenerDispatchTimeout
(long value) In multithreaded environments, this setting controls when dispatches to listeners preserve the ordering the timeout to complete any outstanding dispatches.void
setNamedWindowConsumerDispatchLocking
(Locking namedWindowConsumerDispatchLocking) Sets the locking strategy value for named window dispatches to named window consumers (default is spin).void
setNamedWindowConsumerDispatchPreserveOrder
(boolean isNamedWindowConsumerDispatchPreserveOrder) In multithreaded environments, this setting controls whether named window dispatches to named window consumers preserve the order of events inserted and removed such that statements that consume a named windows delta stream behave deterministic (true by default).void
setNamedWindowConsumerDispatchTimeout
(long namedWindowConsumerDispatchTimeout) Sets the timeout millisecond value for named window dispatches to named window consumers.void
setRuntimeFairlock
(boolean runtimeFairlock) Set to true to configured the runtime-level lock as a fair lock (default is false).void
setThreadPoolInbound
(boolean threadPoolInbound) Set to true for inbound threading enabled, the default is false for not enabled.void
setThreadPoolInboundCapacity
(Integer capacity) Sets the capacity of the inbound queue, or null if none defined (the unbounded case, default).void
setThreadPoolInboundNumThreads
(int num) Sets the number of threads in the thread pool for inbound threading.void
setThreadPoolOutbound
(boolean threadPoolOutbound) Set to true for outbound threading enabled, the default is false for not enabled.void
setThreadPoolOutboundCapacity
(Integer capacity) Sets the capacity of the outbound queue, or null if none defined (the unbounded case, default).void
setThreadPoolOutboundNumThreads
(int num) Sets the number of threads in the thread pool for outbound threading.void
setThreadPoolRouteExec
(boolean threadPoolRouteExec) Set to true for route execution threading enabled, the default is false for not enabled.void
setThreadPoolRouteExecCapacity
(Integer capacity) Sets the capacity of the route execution queue, or null if none defined (the unbounded case, default).void
setThreadPoolRouteExecNumThreads
(int num) Sets the number of threads in the thread pool for route exec threading.void
setThreadPoolTimerExec
(boolean threadPoolTimerExec) Set to true for timer execution threading enabled, the default is false for not enabled.void
setThreadPoolTimerExecCapacity
(Integer capacity) Sets the capacity of the timer execution queue, or null if none defined (the unbounded case, default).void
setThreadPoolTimerExecNumThreads
(int num) Sets the number of threads in the thread pool for timer exec threading.
-
Constructor Details
-
ConfigurationRuntimeThreading
public ConfigurationRuntimeThreading()Ctor - sets up defaults.
-
-
Method Details
-
setListenerDispatchPreserveOrder
public void setListenerDispatchPreserveOrder(boolean value) In multithreaded environments, this setting controls whether dispatches to listeners preserve the ordering in which the statement processes events.- Parameters:
value
- is true to preserve ordering, or false if not
-
setListenerDispatchTimeout
public void setListenerDispatchTimeout(long value) In multithreaded environments, this setting controls when dispatches to listeners preserve the ordering the timeout to complete any outstanding dispatches.- Parameters:
value
- is the timeout in milliseconds that the runtime may spend waiting for a listener dispatch to complete before dispatching further results for the same statement to listeners for that statement
-
setInsertIntoDispatchPreserveOrder
public void setInsertIntoDispatchPreserveOrder(boolean value) In multithreaded environments, this setting controls whether insert-into streams preserve the order of events inserted into them by one or more statements such that statements that consume other statement's events behave deterministic- Parameters:
value
- is true to indicate to preserve order, or false to not preserve order
-
isListenerDispatchPreserveOrder
public boolean isListenerDispatchPreserveOrder()Returns true to indicate preserve order for dispatch to listeners, or false to indicate not to preserve order- Returns:
- true or false
-
getListenerDispatchTimeout
public long getListenerDispatchTimeout()Returns the timeout in millisecond to wait for listener code to complete before dispatching the next result, if dispatch order is preserved- Returns:
- listener dispatch timeout
-
isInsertIntoDispatchPreserveOrder
public boolean isInsertIntoDispatchPreserveOrder()Returns true to indicate preserve order for inter-statement insert-into, or false to indicate not to preserve order- Returns:
- true or false
-
setInternalTimerEnabled
public void setInternalTimerEnabled(boolean internalTimerEnabled) Sets the use of internal timer.By setting internal timer to true (the default) the runtime starts the internal timer thread and relies on internal timer events to supply the time.
By setting internal timer to false the runtime does not start the internal timer thread and relies on external application-supplied timer events to supply the time.
- Parameters:
internalTimerEnabled
- is true for internal timer enabled, or false if the application supplies timer events
-
isInternalTimerEnabled
public boolean isInternalTimerEnabled()Returns true if internal timer is enabled (the default), or false for internal timer disabled.- Returns:
- true for internal timer enabled, false for internal timer disabled
-
getInternalTimerMsecResolution
public long getInternalTimerMsecResolution()Returns the millisecond resolution of the internal timer thread.- Returns:
- number of milliseconds between timer processing intervals
-
setInternalTimerMsecResolution
public void setInternalTimerMsecResolution(long internalTimerMsecResolution) Sets the length of the interval (resolution) of the timer thread.- Parameters:
internalTimerMsecResolution
- is the millisecond interval length
-
getInsertIntoDispatchTimeout
public long getInsertIntoDispatchTimeout()Returns the number of milliseconds that a thread may maximally be blocking to deliver statement results from a producing statement that employs insert-into to a consuming statement.- Returns:
- millisecond timeout for order-of-delivery blocking between statements
-
setListenerDispatchLocking
Sets the blocking strategy to use when multiple threads deliver results for a single statement to listeners, and the guarantee of order of delivery must be maintained.- Parameters:
listenerDispatchLocking
- is the blocking technique
-
setInsertIntoDispatchTimeout
public void setInsertIntoDispatchTimeout(long msecTimeout) Sets the number of milliseconds that a thread may maximally be blocking to deliver statement results from a producing statement that employs insert-into to a consuming statement.- Parameters:
msecTimeout
- timeout for order-of-delivery blocking between statements
-
setInsertIntoDispatchLocking
Sets the blocking strategy to use when multiple threads deliver results for a single statement to consuming statements of an insert-into, and the guarantee of order of delivery must be maintained.- Parameters:
insertIntoDispatchLocking
- is the blocking technique
-
getListenerDispatchLocking
Returns the blocking strategy to use when multiple threads deliver results for a single statement to listeners, and the guarantee of order of delivery must be maintained.- Returns:
- is the blocking technique
-
getInsertIntoDispatchLocking
Returns the blocking strategy to use when multiple threads deliver results for a single statement to consuming statements of an insert-into, and the guarantee of order of delivery must be maintained.- Returns:
- is the blocking technique
-
isThreadPoolInbound
public boolean isThreadPoolInbound()Returns true for inbound threading enabled, the default is false for not enabled.- Returns:
- indicator whether inbound threading is enabled
-
setThreadPoolInbound
public void setThreadPoolInbound(boolean threadPoolInbound) Set to true for inbound threading enabled, the default is false for not enabled.- Parameters:
threadPoolInbound
- indicator whether inbound threading is enabled
-
isThreadPoolTimerExec
public boolean isThreadPoolTimerExec()Returns true for timer execution threading enabled, the default is false for not enabled.- Returns:
- indicator whether timer execution threading is enabled
-
setThreadPoolTimerExec
public void setThreadPoolTimerExec(boolean threadPoolTimerExec) Set to true for timer execution threading enabled, the default is false for not enabled.- Parameters:
threadPoolTimerExec
- indicator whether timer execution threading is enabled
-
isThreadPoolRouteExec
public boolean isThreadPoolRouteExec()Returns true for route execution threading enabled, the default is false for not enabled.- Returns:
- indicator whether route execution threading is enabled
-
setThreadPoolRouteExec
public void setThreadPoolRouteExec(boolean threadPoolRouteExec) Set to true for route execution threading enabled, the default is false for not enabled.- Parameters:
threadPoolRouteExec
- indicator whether route execution threading is enabled
-
isThreadPoolOutbound
public boolean isThreadPoolOutbound()Returns true for outbound threading enabled, the default is false for not enabled.- Returns:
- indicator whether outbound threading is enabled
-
setThreadPoolOutbound
public void setThreadPoolOutbound(boolean threadPoolOutbound) Set to true for outbound threading enabled, the default is false for not enabled.- Parameters:
threadPoolOutbound
- indicator whether outbound threading is enabled
-
getThreadPoolInboundNumThreads
public int getThreadPoolInboundNumThreads()Returns the number of thread in the inbound threading pool.- Returns:
- number of threads
-
setThreadPoolInboundNumThreads
public void setThreadPoolInboundNumThreads(int num) Sets the number of threads in the thread pool for inbound threading.- Parameters:
num
- number of threads
-
getThreadPoolOutboundNumThreads
public int getThreadPoolOutboundNumThreads()Returns the number of thread in the outbound threading pool.- Returns:
- number of threads
-
setThreadPoolOutboundNumThreads
public void setThreadPoolOutboundNumThreads(int num) Sets the number of threads in the thread pool for outbound threading.- Parameters:
num
- number of threads
-
getThreadPoolRouteExecNumThreads
public int getThreadPoolRouteExecNumThreads()Returns the number of thread in the route execution thread pool.- Returns:
- number of threads
-
setThreadPoolRouteExecNumThreads
public void setThreadPoolRouteExecNumThreads(int num) Sets the number of threads in the thread pool for route exec threading.- Parameters:
num
- number of threads
-
getThreadPoolTimerExecNumThreads
public int getThreadPoolTimerExecNumThreads()Returns the number of thread in the timer execution threading pool.- Returns:
- number of threads
-
setThreadPoolTimerExecNumThreads
public void setThreadPoolTimerExecNumThreads(int num) Sets the number of threads in the thread pool for timer exec threading.- Parameters:
num
- number of threads
-
getThreadPoolTimerExecCapacity
Returns the capacity of the timer execution queue, or null if none defined (the unbounded case, default).- Returns:
- capacity or null if none defined
-
setThreadPoolTimerExecCapacity
Sets the capacity of the timer execution queue, or null if none defined (the unbounded case, default).- Parameters:
capacity
- capacity or null if none defined
-
getThreadPoolInboundCapacity
Returns the capacity of the inbound execution queue, or null if none defined (the unbounded case, default).- Returns:
- capacity or null if none defined
-
setThreadPoolInboundCapacity
Sets the capacity of the inbound queue, or null if none defined (the unbounded case, default).- Parameters:
capacity
- capacity or null if none defined
-
getThreadPoolRouteExecCapacity
Returns the capacity of the route execution queue, or null if none defined (the unbounded case, default).- Returns:
- capacity or null if none defined
-
setThreadPoolRouteExecCapacity
Sets the capacity of the route execution queue, or null if none defined (the unbounded case, default).- Parameters:
capacity
- capacity or null if none defined
-
getThreadPoolOutboundCapacity
Returns the capacity of the outbound queue, or null if none defined (the unbounded case, default).- Returns:
- capacity or null if none defined
-
setThreadPoolOutboundCapacity
Sets the capacity of the outbound queue, or null if none defined (the unbounded case, default).- Parameters:
capacity
- capacity or null if none defined
-
isRuntimeFairlock
public boolean isRuntimeFairlock()Returns true if the runtime-level lock is configured as a fair lock (default is false).This lock coordinates event processing threads (threads that send events) with threads that perform administrative functions (threads that start or destroy statements, for example).
- Returns:
- true for fair lock
-
setRuntimeFairlock
public void setRuntimeFairlock(boolean runtimeFairlock) Set to true to configured the runtime-level lock as a fair lock (default is false).This lock coordinates event processing threads (threads that send events) with threads that perform administrative functions (threads that start or destroy statements, for example).
- Parameters:
runtimeFairlock
- true for fair lock
-
isNamedWindowConsumerDispatchPreserveOrder
public boolean isNamedWindowConsumerDispatchPreserveOrder()In multithreaded environments, this setting controls whether named window dispatches to named window consumers preserve the order of events inserted and removed such that statements that consume a named windows delta stream behave deterministic (true by default).- Returns:
- flag
-
setNamedWindowConsumerDispatchPreserveOrder
public void setNamedWindowConsumerDispatchPreserveOrder(boolean isNamedWindowConsumerDispatchPreserveOrder) In multithreaded environments, this setting controls whether named window dispatches to named window consumers preserve the order of events inserted and removed such that statements that consume a named windows delta stream behave deterministic (true by default).- Parameters:
isNamedWindowConsumerDispatchPreserveOrder
- flag
-
getNamedWindowConsumerDispatchTimeout
public long getNamedWindowConsumerDispatchTimeout()Returns the timeout millisecond value for named window dispatches to named window consumers.- Returns:
- timeout milliseconds
-
setNamedWindowConsumerDispatchTimeout
public void setNamedWindowConsumerDispatchTimeout(long namedWindowConsumerDispatchTimeout) Sets the timeout millisecond value for named window dispatches to named window consumers.- Parameters:
namedWindowConsumerDispatchTimeout
- timeout milliseconds
-
getNamedWindowConsumerDispatchLocking
Returns the locking strategy value for named window dispatches to named window consumers (default is spin).- Returns:
- strategy
-
setNamedWindowConsumerDispatchLocking
Sets the locking strategy value for named window dispatches to named window consumers (default is spin).- Parameters:
namedWindowConsumerDispatchLocking
- strategy
-