public interface EventCache
Title: Service Event Fabric Core
Description: Defines a cache that stores durable events matching a simple event filter.
The cache stores durable events (i.e. events with durable
filed equals to true
).
See ImmutableEventDatagram.getDurable()
and EventDatagram.setDurable(boolean)
for further information.
The cache has a limited size (i.e. maximum number of events which the cache can contain).
When a number of events in the cache reaches the limit, the cache uses the specified strategy
(CacheThresholdAction.LRE_DISCARD
or CacheThresholdAction.MRE_DISCARD
) to resolve this issue.
Copyright: Copyright (c) 2013
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all events from the cache.
|
java.lang.String |
getEventFilter()
Returns the event filter associated with the cache.
|
java.util.List |
getEvents()
Returns a list of all events contained in the cache.
|
int |
getMaxSize()
Returns the max size of the cache (i.e.
|
int |
getSize()
Returns the current size of the cache (i.e.
|
CacheThresholdAction |
getThresholdAction()
Returns a type of the action that is performed if the cache is overflowed.
|
void |
setMaxSize(int maxSize)
Sets the max size of the cache.
|
java.lang.String getEventFilter()
int getMaxSize()
void setMaxSize(int maxSize) throws FabricEventDispatcherException, FabricExchangeException
This operation can throw the FabricExchangeException
only if the cache is located at the remote node.
maxSize
- the max size to be set.FabricEventDispatcherException
- if the maxSize
is not positive ofFabricExchangeException
- if some error occurs in the Exchange.CacheThresholdAction getThresholdAction()
int getSize() throws FabricExchangeException
This operation can throw an exception only if the cache is located at the remote node.
FabricExchangeException
- if some error occurs in the Exchange.java.util.List getEvents() throws FabricExchangeException
This operation can throw an exception only if the cache is located at the remote node.
FabricExchangeException
- if some error occurs in the Exchange.void clear() throws FabricExchangeException
This operation can throw an exception only if the cache is located at the remote node.
FabricExchangeException
- if some error occurs in the Exchange.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.