Search in sources :

Example 6 with AtomicConfiguration

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

the class GridCachePartitionedAtomicSequenceTxSelfTest method atomicConfiguration.

/**
 * @return Atomic config for test.
 */
protected AtomicConfiguration atomicConfiguration() {
    AtomicConfiguration cfg = new AtomicConfiguration();
    cfg.setBackups(1);
    cfg.setAtomicSequenceReserveSize(SEQ_CACHE_SIZE);
    return cfg;
}
Also used : AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration)

Example 7 with AtomicConfiguration

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

the class GridCachePartitionedAtomicSequenceTxSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    spi.setIpFinder(ipFinder);
    cfg.setDiscoverySpi(spi);
    cfg.setPublicThreadPoolSize(THREAD_NUM);
    AtomicConfiguration atomicCfg = atomicConfiguration();
    assertNotNull(atomicCfg);
    cfg.setAtomicConfiguration(atomicCfg);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 8 with AtomicConfiguration

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

the class GridCacheAbstractDataStructuresFailoverSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
    AtomicConfiguration atomicCfg = new AtomicConfiguration();
    atomicCfg.setCacheMode(collectionCacheMode());
    atomicCfg.setBackups(collectionConfiguration().getBackups());
    cfg.setAtomicConfiguration(atomicCfg);
    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfg.setName(TRANSACTIONAL_CACHE_NAME);
    ccfg.setAtomicityMode(TRANSACTIONAL);
    cfg.setCacheConfiguration(ccfg);
    if (client) {
        cfg.setClientMode(client);
        ((TcpDiscoverySpi) (cfg.getDiscoverySpi())).setForceServerMode(true);
    }
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 9 with AtomicConfiguration

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

the class SemaphoreFailoverSafeReleasePermitsTest method atomicConfiguration.

/**
 * @return Atomic configuration.
 */
protected AtomicConfiguration atomicConfiguration() {
    AtomicConfiguration atomicCfg = new AtomicConfiguration();
    atomicCfg.setCacheMode(atomicsCacheMode);
    if (atomicsCacheMode == PARTITIONED)
        atomicCfg.setBackups(1);
    return atomicCfg;
}
Also used : AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration)

Example 10 with AtomicConfiguration

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

the class SemaphoreFailoverSafeReleasePermitsTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    spi.setIpFinder(ipFinder);
    cfg.setDiscoverySpi(spi);
    AtomicConfiguration atomicCfg = atomicConfiguration();
    assertNotNull(atomicCfg);
    cfg.setAtomicConfiguration(atomicCfg);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

AtomicConfiguration (org.apache.ignite.configuration.AtomicConfiguration)29 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)10 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)9 Ignite (org.apache.ignite.Ignite)6 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)5 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)5 IgniteAtomicSequence (org.apache.ignite.IgniteAtomicSequence)3 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 IgniteAtomicLong (org.apache.ignite.IgniteAtomicLong)2 BinaryBasicNameMapper (org.apache.ignite.binary.BinaryBasicNameMapper)2 LruEvictionPolicy (org.apache.ignite.cache.eviction.lru.LruEvictionPolicy)2 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)2 TransactionConfiguration (org.apache.ignite.configuration.TransactionConfiguration)2 PlatformDotNetBinaryConfiguration (org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration)2 NoopEventStorageSpi (org.apache.ignite.spi.eventstorage.NoopEventStorageSpi)2 MemoryEventStorageSpi (org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi)2 Serializable (java.io.Serializable)1 Map (java.util.Map)1 IgniteException (org.apache.ignite.IgniteException)1