Search in sources :

Example 1 with LocalJoinCachesContext

use of org.apache.ignite.internal.processors.cache.LocalJoinCachesContext in project ignite by apache.

the class GridDhtPartitionsExchangeFuture method initCachesOnLocalJoin.

/**
 * @throws IgniteCheckedException If failed.
 */
private void initCachesOnLocalJoin() throws IgniteCheckedException {
    cctx.activate();
    LocalJoinCachesContext locJoinCtx = exchActions == null ? null : exchActions.localJoinContext();
    List<T2<DynamicCacheDescriptor, NearCacheConfiguration>> caches = locJoinCtx == null ? null : locJoinCtx.caches();
    if (!cctx.kernalContext().clientNode()) {
        List<DynamicCacheDescriptor> startDescs = new ArrayList<>();
        if (caches != null) {
            for (T2<DynamicCacheDescriptor, NearCacheConfiguration> c : caches) {
                DynamicCacheDescriptor startDesc = c.get1();
                if (CU.isPersistentCache(startDesc.cacheConfiguration(), cctx.gridConfig().getDataStorageConfiguration()))
                    startDescs.add(startDesc);
            }
        }
        cctx.database().readCheckpointAndRestoreMemory(startDescs);
    }
    cctx.cache().startCachesOnLocalJoin(locJoinCtx, initialVersion());
}
Also used : ArrayList(java.util.ArrayList) DynamicCacheDescriptor(org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor) LocalJoinCachesContext(org.apache.ignite.internal.processors.cache.LocalJoinCachesContext) T2(org.apache.ignite.internal.util.typedef.T2) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration)

Aggregations

ArrayList (java.util.ArrayList)1 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)1 DynamicCacheDescriptor (org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor)1 LocalJoinCachesContext (org.apache.ignite.internal.processors.cache.LocalJoinCachesContext)1 T2 (org.apache.ignite.internal.util.typedef.T2)1