Click on Javadoc link to open Javadoc documentation.
Package
org.gridgain.grid.spi.eventstorage.memory ![]()
Description
In-memory GridEventStorageSpi ![]()
Configuration
The following configuration parameters can be used to configure GridMemoryEventStorageSpi
| Setter Method | Description | Optional | Default |
|---|---|---|---|
| setExpireAgeMs(long) |
Events expiration time. All events that exceed this value will be removed from the queue when next event comes. | Yes | Long.MAX_VALUE (specified by GridMemoryEventStorageSpi.DFLT_EXPIRE_AGE_MS |
| setExpireCount(long) |
Eevents queue size. Events will be filtered out when new request comes. | Yes | 10000 (specified by GridMemoryEventStorageSpi.DFLT_EXPIRE_COUNT |

For more information about using Spring framework for configuration click here.
Examples
GridMemoryEventStorageSpi is used by default and should be explicitly configured only if some SPI configuration parameters need to be overridden. Examples below insert own events queue size value that differs from default 10000.
GridMemoryEventStorageSpispi = new GridMemoryEventStorageSpi(); // Init own events size. spi.setExpireCount(2000); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override default event storage SPI. cfg.setEventStorageSpi(spi); // Start grid. GridFactory.start(cfg);
or from Spring configuration file
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true"> ... <property name="eventStorageSpi"> <bean class="org.gridgain.grid.spi.eventstorage.memory.GridMemoryEventStorageSpi"> <property name="expireCount" value="2000"/> </bean> </property> ... </bean>
