Dashboard > GridGain User Guide > Table Of Contents > Developers Guide > Event Storage SPI > GridMemoryEventStorageSpi
GridMemoryEventStorageSpi
Added by user-1-ds, last edited by morpheus on Mar 10, 2008  (view change)
Labels: 
(None)


Click on Javadoc link to open Javadoc documentation.

Package

org.gridgain.grid.spi.eventstorage.memory Javadoc

Description

In-memory GridEventStorageSpi Javadoc SPI implementation.

Configuration

The following configuration parameters can be used to configure GridMemoryEventStorageSpi

Setter Method Description Optional Default
setExpireAgeMs(long) Javadoc 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 Javadoc )
setExpireCount(long) Javadoc Eevents queue size. Events will be filtered out when new request comes. Yes 10000 (specified by GridMemoryEventStorageSpi.DFLT_EXPIRE_COUNT Javadoc )


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>

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators