Search in sources :

Example 1 with GridSetWrapper

use of org.apache.ignite.internal.util.GridSetWrapper in project ignite by apache.

the class IgniteTxAdapter method sessionEnd.

/**
 * @param stores Store managers.
 * @param commit Commit flag.
 * @throws IgniteCheckedException In case of error.
 */
protected void sessionEnd(final Collection<CacheStoreManager> stores, boolean commit) throws IgniteCheckedException {
    Iterator<CacheStoreManager> it = stores.iterator();
    Set<CacheStore> visited = new GridSetWrapper<>(new IdentityHashMap<CacheStore, Object>());
    while (it.hasNext()) {
        CacheStoreManager store = it.next();
        store.sessionEnd(this, commit, !it.hasNext(), !visited.add(store.store()));
    }
}
Also used : CacheObject(org.apache.ignite.internal.processors.cache.CacheObject) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject) CacheStore(org.apache.ignite.cache.store.CacheStore) CacheStoreManager(org.apache.ignite.internal.processors.cache.store.CacheStoreManager) GridSetWrapper(org.apache.ignite.internal.util.GridSetWrapper)

Aggregations

CacheStore (org.apache.ignite.cache.store.CacheStore)1 CacheObject (org.apache.ignite.internal.processors.cache.CacheObject)1 KeyCacheObject (org.apache.ignite.internal.processors.cache.KeyCacheObject)1 CacheStoreManager (org.apache.ignite.internal.processors.cache.store.CacheStoreManager)1 GridSetWrapper (org.apache.ignite.internal.util.GridSetWrapper)1