Search in sources :

Example 76 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridCacheEntryVersionSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
    discoSpi.setIpFinder(IP_FINDER);
    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfg.setCacheMode(PARTITIONED);
    ccfg.setBackups(1);
    ccfg.setAtomicityMode(atomicityMode);
    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    cfg.setCacheConfiguration(ccfg);
    cfg.setDiscoverySpi(discoSpi);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 77 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridCacheEvictionEventAbstractTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration() throws Exception {
    IgniteConfiguration c = super.getConfiguration();
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(ipFinder);
    c.setDiscoverySpi(disco);
    CacheConfiguration cc = defaultCacheConfiguration();
    cc.setCacheMode(cacheMode());
    cc.setAtomicityMode(atomicityMode());
    cc.setEvictionPolicy(new FifoEvictionPolicy());
    cc.setOnheapCacheEnabled(true);
    c.setCacheConfiguration(cc);
    c.setIncludeEventTypes(EVT_CACHE_ENTRY_EVICTED, EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED);
    return c;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) FifoEvictionPolicy(org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 78 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridCacheIncrementTransformTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration cache = new CacheConfiguration(DEFAULT_CACHE_NAME);
    cache.setCacheMode(PARTITIONED);
    cache.setAtomicityMode(ATOMIC);
    cache.setWriteSynchronizationMode(FULL_SYNC);
    cache.setBackups(1);
    cache.setRebalanceMode(SYNC);
    cfg.setCacheConfiguration(cache);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 79 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridCacheInterceptorAbstractSelfTest method getConfiguration.

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

Example 80 with TcpDiscoverySpi

use of org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi in project ignite by apache.

the class GridCacheIteratorPerformanceTest method getConfiguration.

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

Aggregations

TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)764 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)745 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)330 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)80 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)76 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)58 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)55 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)48 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)48 ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)41 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)35 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)31 IgfsGroupDataBlocksKeyMapper (org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper)21 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)19 ArrayList (java.util.ArrayList)18 Ignite (org.apache.ignite.Ignite)18 TestRecordingCommunicationSpi (org.apache.ignite.internal.TestRecordingCommunicationSpi)18 QueryEntity (org.apache.ignite.cache.QueryEntity)12 DiscoverySpi (org.apache.ignite.spi.discovery.DiscoverySpi)10 MemoryEventStorageSpi (org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi)10