public interface DatabaseSystemEventNode
Modifier and Type | Method and Description |
---|---|
void |
consumeLocalEvent(SystemEvent event)
Cause asynchronous consumption of this event to occur in the same JVM, rather than provide to event to the
cluster.
|
EventWorkerType |
determineHostWorkerType()
Determine if this is an ADMIN or SITE node
|
void |
executeEvents(List<SystemEvent> events,
boolean durable,
QueueStatusThreadPoolTaskExecutor executor)
Iterate through a list of events and provide those events to the appropriate
SystemEventConsumer
instances. |
int |
getDurableEventsPerPoll()
Deprecated.
Not used internally
|
Map<String,List<SystemEventConsumer>> |
getEventConsumers()
All the
SystemEventConsumer instances registered in Spring. |
int |
getEventsPerPoll()
The number of
EventScopeType.VM events to retrieve in each poll. |
int |
getGlobalEventsPerPoll()
The number of
EventScopeType.GLOBAL events to retrieve in each poll. |
long |
getGlobalJobThreadPoolCount()
The number of threads actively polling for available
EventScopeType.GLOBAL events. |
long |
getJobThreadPoolCount()
The number of threads actively polling for available
EventScopeType.VM events. |
long |
getMissedDurableEventsPollingThresholdSeconds()
The maximum amount of time into the past that durable events should be retrieved.
|
String |
getNodeId() |
RegisteredNode |
getNodeRegistration()
Get the
RegisteredNode associated. |
long |
getPollingIntervalSeconds()
The wait time between each polling attempt for available events.
|
int |
getPriorityEventsPerPoll()
The number of priority events to retrieve in each poll.
|
long |
getPriorityJobThreadPoolCount()
The number of threads actively polling for priority events (
EventScopeType.VM or EventScopeType.GLOBAL ). |
DatabaseSystemEventDao |
getSystemEventDao() |
void |
invalidateCacheElement(String entityClass,
String id) |
void |
invalidateCacheElement(String entityClass,
String property,
String id)
Utility method for initiating a cache invalidation event.
|
void |
invalidateCacheRegion(String region) |
boolean |
isCreated() |
boolean |
isPause()
Whether or not this node is paused.
|
void |
setDurableEventsPerPoll(int missedDurableEventsPerPoll)
Deprecated.
Not used internally
|
void |
setEventConsumers(Map<String,List<SystemEventConsumer>> eventConsumers) |
void |
setEventsPerPoll(int eventsPerPoll) |
void |
setGlobalEventsPerPoll(int globalEventsPerPoll) |
void |
setGlobalJobThreadPoolCount(long globalJobThreadPoolCount) |
void |
setJobThreadPoolCount(long jobThreadPoolCount) |
void |
setMissedDurableEventsPollingThresholdSeconds(long missedDurableEventsPollingThreshold) |
void |
setPause(boolean pause) |
void |
setPollingIntervalSeconds(long pollingInterval) |
void |
setPriorityEventsPerPoll(int priorityEventsPerPoll) |
void |
setPriorityJobThreadPoolCount(long priorityJobThreadPoolCount) |
boolean isPause()
void setPause(boolean pause)
long getPollingIntervalSeconds()
void setPollingIntervalSeconds(long pollingInterval)
long getJobThreadPoolCount()
EventScopeType.VM
events. Defaults to 2. See DatabaseSystemEventNodeImpl.jobThreadPoolCount
for more info.void setJobThreadPoolCount(long jobThreadPoolCount)
long getPriorityJobThreadPoolCount()
EventScopeType.VM
or EventScopeType.GLOBAL
). See DatabaseSystemEventNodeImpl.priorityJobThreadPoolCount
for more info. Default is 4.void setPriorityJobThreadPoolCount(long priorityJobThreadPoolCount)
long getGlobalJobThreadPoolCount()
EventScopeType.GLOBAL
events. Defaults to 3. See DatabaseSystemEventNodeImpl.globalJobThreadPoolCount
for more info.void setGlobalJobThreadPoolCount(long globalJobThreadPoolCount)
Map<String,List<SystemEventConsumer>> getEventConsumers()
SystemEventConsumer
instances registered in Spring.void setEventConsumers(Map<String,List<SystemEventConsumer>> eventConsumers)
void invalidateCacheElement(String entityClass, String property, String id)
entityClass
- property
- id
- DatabaseSystemEventDao getSystemEventDao()
void invalidateCacheRegion(String region)
int getEventsPerPoll()
EventScopeType.VM
events to retrieve in each poll. This can be increased to process more events at any given time
at the cost of prolonged CPU consumption. It is likely advantageous to throttle event consumption to avoid overly taxing
the system and penalizing other operations. Also, smaller event processing groups allows the system to respond more
quickly to events that utilize the priority feature (see SystemEvent.getPriority()
.
The default value is 5. This does not include events of type GLOBAL_DURABLE.
See the discussion on getPriorityEventsPerPoll()
for similar configuration related to special priority events.void setEventsPerPoll(int eventsPerPoll)
int getPriorityEventsPerPoll()
SystemEvent.getPriority()
less than zero.
Priority events are generally considered to be important functional events that consume very quickly (e.g. cache invalidations).
Processing these events in their own queue attempts to guarantee a more timely processing, instead of having them
queue up with standard, possibly long-running, events in the standard queue.
The priority events per poll can be increased to process more events at any given time
at the cost of prolonged CPU consumption. It is likely advantageous to throttle event consumption to avoid overly taxing
the system and penalizing other operations. The default value is 5. This does not include events of type GLOBAL_DURABLE.void setPriorityEventsPerPoll(int priorityEventsPerPoll)
int getGlobalEventsPerPoll()
EventScopeType.GLOBAL
events to retrieve in each poll. This can be increased to process more events at any given time
at the cost of prolonged CPU consumption. It is likely advantageous to throttle event consumption to avoid overly taxing
the system and penalizing other operations. Also, smaller event processing groups allows the system to respond more
quickly to events that utilize the priority feature (see SystemEvent.getPriority()
.
The default value is 5. This does not include events of type GLOBAL_DURABLE.
See the discussion on getPriorityEventsPerPoll()
for similar configuration related to special priority events.void setGlobalEventsPerPoll(int globalEventsPerPoll)
EventWorkerType determineHostWorkerType()
void consumeLocalEvent(SystemEvent event)
event
- @Deprecated int getDurableEventsPerPoll()
SystemEvent.getPriority()
.@Deprecated void setDurableEventsPerPoll(int missedDurableEventsPerPoll)
missedDurableEventsPerPoll
- long getMissedDurableEventsPollingThresholdSeconds()
void setMissedDurableEventsPollingThresholdSeconds(long missedDurableEventsPollingThreshold)
void executeEvents(List<SystemEvent> events, boolean durable, QueueStatusThreadPoolTaskExecutor executor)
SystemEventConsumer
instances.events
- durable
- Whether or not these events are durable (i.e. GLOBAL_DURABLE)executor
- boolean isCreated()
String getNodeId()
RegisteredNode getNodeRegistration()
RegisteredNode
associated. Every instance of DatabaseSystemEventNode
creates a registration in the database.Copyright © 2019. All rights reserved.