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)
Iterate through a list of events and provide those events to the appropriate
SystemEventConsumer
instances. |
int |
getDurableEventsPerPoll()
The number of events of type DURABLE_GLOBAL to retrieve in each poll.
|
Map<String,List<SystemEventConsumer>> |
getEventConsumers()
All the
SystemEventConsumer instances registered in Spring. |
int |
getEventsPerPoll()
The number of events to retrieve in each poll.
|
long |
getJobThreadPoolCount()
The number of threads actively polling for available events.
|
long |
getMissedDurableEventsPollingThresholdSeconds()
The maximum amount of time into the past that durable events should be retrieved.
|
Long |
getNodeId() |
NodeRegistration |
getNodeRegistration()
Get the
NodeRegistration associated. |
long |
getPollingIntervalSeconds()
The wait time between each polling attempt for available events.
|
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) |
void |
invalidateCategory(String id) |
void |
invalidateCustomer(String id) |
void |
invalidateOffer(String id) |
void |
invalidateProduct(String id) |
boolean |
isCreated() |
boolean |
isPause()
Whether or not this node is paused.
|
void |
setDurableEventsPerPoll(int missedDurableEventsPerPoll) |
void |
setEventConsumers(Map<String,List<SystemEventConsumer>> eventConsumers) |
void |
setEventsPerPoll(int eventsPerPoll) |
void |
setJobThreadPoolCount(long jobThreadPoolCount) |
void |
setMissedDurableEventsPollingThresholdSeconds(long missedDurableEventsPollingThreshold) |
void |
setPause(boolean pause) |
void |
setPollingIntervalSeconds(long pollingInterval) |
boolean isPause()
void setPause(boolean pause)
long getPollingIntervalSeconds()
void setPollingIntervalSeconds(long pollingInterval)
long getJobThreadPoolCount()
void setJobThreadPoolCount(long jobThreadPoolCount)
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
- void invalidateProduct(String id)
void invalidateCategory(String id)
void invalidateOffer(String id)
void invalidateCustomer(String id)
void invalidateCacheRegion(String region)
int getEventsPerPoll()
SystemEvent.getPriority()
.
The default value is 5. This does not include events of type GLOBAL_DURABLE.void setEventsPerPoll(int eventsPerPoll)
EventWorkerType determineHostWorkerType()
void consumeLocalEvent(SystemEvent event)
event
- int getDurableEventsPerPoll()
SystemEvent.getPriority()
.void setDurableEventsPerPoll(int missedDurableEventsPerPoll)
long getMissedDurableEventsPollingThresholdSeconds()
void setMissedDurableEventsPollingThresholdSeconds(long missedDurableEventsPollingThreshold)
void executeEvents(List<SystemEvent> events, boolean durable)
SystemEventConsumer
instances.events
- durable
- Whether or not these events are durable (i.e. GLOBAL_DURABLE)boolean isCreated()
Long getNodeId()
NodeRegistration getNodeRegistration()
NodeRegistration
associated. Every instance of DatabaseSystemEventNode
creates a registration in the database.Copyright © 2019. All rights reserved.