Package org.gridgain.grid.cache

Examples of org.gridgain.grid.cache.GridCacheDistributionMode


        GridCacheConfiguration ccfg2 = defaultCacheConfiguration();

        ccfg2.setName(null);

        GridCacheDistributionMode distrMode;

        if (gridName.equals(getTestGridName(1)))
            distrMode = NEAR_ONLY;
        else if (gridName.equals(getTestGridName(2)))
            distrMode = NEAR_PARTITIONED;
View Full Code Here


            cfg.setGridName("g" + i);

            GridCacheConfiguration cacheCfg = cfg.getCacheConfiguration()[0];

            GridCacheDistributionMode distro = i == 0 &&
                args.distribution() == CLIENT_ONLY ? CLIENT_ONLY : PARTITIONED_ONLY;

            cacheCfg.setCacheMode(args.cache());
            cacheCfg.setDistributionMode(distro);
            cacheCfg.setWriteSynchronizationMode(args.synchronization());
View Full Code Here

     */
    public static boolean isAffinityNode(GridCacheConfiguration cfg) {
        if (cfg.getCacheMode() == LOCAL)
            return true;

        GridCacheDistributionMode partTax = cfg.getDistributionMode();

        if (partTax == null)
            partTax = distributionMode(cfg);

        return partTax == GridCacheDistributionMode.PARTITIONED_ONLY ||
View Full Code Here

        }
    }

    /** {@inheritDoc} */
    @Override public List<GridCacheClearAllRunnable<K, V>> splitClearAll() {
        GridCacheDistributionMode mode = configuration().getDistributionMode();

        return (mode == PARTITIONED_ONLY || mode == NEAR_PARTITIONED) ? super.splitClearAll() :
            Collections.<GridCacheClearAllRunnable<K, V>>emptyList();
    }
View Full Code Here

TOP

Related Classes of org.gridgain.grid.cache.GridCacheDistributionMode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.