Search in sources :

Example 6 with CacheStoreSessionListener

use of org.apache.ignite.cache.store.CacheStoreSessionListener in project ignite by apache.

the class GridCacheStoreManagerAdapter method sessionEnd.

/** {@inheritDoc} */
@Override
public final void sessionEnd(IgniteInternalTx tx, boolean commit, boolean last) throws IgniteCheckedException {
    assert store != null;
    sessionInit0(tx);
    try {
        if (sesLsnrs != null) {
            for (CacheStoreSessionListener lsnr : sesLsnrs) lsnr.onSessionEnd(locSes, commit);
        }
        if (!sesHolder.get().ended(store))
            store.sessionEnd(commit);
    } catch (Throwable e) {
        last = true;
        throw e;
    } finally {
        if (last && sesHolder != null) {
            sesHolder.set(null);
            tx.removeMeta(SES_ATTR);
        }
    }
}
Also used : CacheStoreSessionListener(org.apache.ignite.cache.store.CacheStoreSessionListener)

Aggregations

CacheStoreSessionListener (org.apache.ignite.cache.store.CacheStoreSessionListener)6 Ignite (org.apache.ignite.Ignite)3 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)3 Person (org.apache.ignite.examples.model.Person)3 ArrayList (java.util.ArrayList)1 NoSuchElementException (java.util.NoSuchElementException)1 CacheLoaderException (javax.cache.integration.CacheLoaderException)1 CacheWriterException (javax.cache.integration.CacheWriterException)1 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 IgniteException (org.apache.ignite.IgniteException)1 CacheHibernateStoreSessionListener (org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListener)1 CacheJdbcStoreSessionListener (org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener)1 CacheSpringStoreSessionListener (org.apache.ignite.cache.store.spring.CacheSpringStoreSessionListener)1 CacheStorePartialUpdateException (org.apache.ignite.internal.processors.cache.CacheStorePartialUpdateException)1 LifecycleAware (org.apache.ignite.lifecycle.LifecycleAware)1