Search in sources :

Example 36 with IgniteConfiguration

use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.

the class GridCacheConcurrentGetCacheOnClientTest method getConfiguration.

/**
 * @param gridName Grid name.
 */
@Override
protected IgniteConfiguration getConfiguration(final String gridName) throws Exception {
    final IgniteConfiguration cfg = super.getConfiguration(gridName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 37 with IgniteConfiguration

use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.

the class GridCacheKeyCheckSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(discoSpi);
    cfg.setCacheConfiguration(cacheConfiguration());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 38 with IgniteConfiguration

use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.

the class IgniteDynamicClientCacheStartSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
    cfg.setClientMode(client);
    if (ccfg != null)
        cfg.setCacheConfiguration(ccfg);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 39 with IgniteConfiguration

use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.

the class GridCacheMultithreadedFailoverAbstractTest method configuration.

/**
 * Node configuration.
 *
 * @param idx Node index.
 * @return Node configuration.
 * @throws Exception If failed.
 */
private IgniteConfiguration configuration(int idx) throws Exception {
    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfg.setName(CACHE_NAME);
    ccfg.setCacheMode(cacheMode());
    ccfg.setAtomicityMode(atomicityMode());
    ccfg.setRebalanceMode(SYNC);
    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    ccfg.setEvictionPolicy(null);
    if (cacheMode() == PARTITIONED)
        ccfg.setBackups(backups());
    if (atomicityMode() != ATOMIC && cacheMode() == PARTITIONED) {
        ccfg.setNearConfiguration(new NearCacheConfiguration());
    }
    IgniteConfiguration cfg = getConfiguration(nodeName(idx));
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(ipFinder);
    cfg.setDiscoverySpi(discoSpi);
    cfg.setLocalHost("127.0.0.1");
    cfg.setCacheConfiguration(ccfg);
    cfg.setConnectorConfiguration(null);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 40 with IgniteConfiguration

use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.

the class IgnitePessimisticTxSuspendResumeTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setClientMode(false);
    cfg.setCacheConfiguration(getCacheConfiguration());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration)

Aggregations

IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)2118 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)686 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)404 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)385 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)363 Ignite (org.apache.ignite.Ignite)194 Test (org.junit.Test)182 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)161 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)127 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)123 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)105 TestRecordingCommunicationSpi (org.apache.ignite.internal.TestRecordingCommunicationSpi)98 IgniteEx (org.apache.ignite.internal.IgniteEx)95 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)89 IgniteException (org.apache.ignite.IgniteException)78 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)75 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)72 ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)68 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)65 ArrayList (java.util.ArrayList)55