Search in sources :

Example 31 with AtomicConfiguration

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

the class GridCachePartitionedAtomicReferenceMultiNodeTest method atomicConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected AtomicConfiguration atomicConfiguration() {
    AtomicConfiguration atomicCfg = super.atomicConfiguration();
    atomicCfg.setBackups(1);
    return atomicCfg;
}
Also used : AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration)

Example 32 with AtomicConfiguration

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

the class IgniteSequenceInternalCleanupTest method atomicConfiguration.

/**
 */
protected AtomicConfiguration atomicConfiguration() {
    AtomicConfiguration cfg = new AtomicConfiguration();
    cfg.setCacheMode(PARTITIONED);
    cfg.setBackups(1);
    cfg.setAtomicSequenceReserveSize(SEQ_RESERVE);
    return cfg;
}
Also used : AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration)

Example 33 with AtomicConfiguration

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

the class GridCacheReplicatedSequenceMultiNodeSelfTest method atomicConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected AtomicConfiguration atomicConfiguration() {
    AtomicConfiguration atomicCfg = super.atomicConfiguration();
    atomicCfg.setAtomicSequenceReserveSize(BATCH_SIZE);
    return atomicCfg;
}
Also used : AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration)

Example 34 with AtomicConfiguration

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

the class GridCachePartitionedSequenceApiSelfTest method atomicConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected AtomicConfiguration atomicConfiguration() {
    AtomicConfiguration atomicCfg = super.atomicConfiguration();
    atomicCfg.setBackups(1);
    return atomicCfg;
}
Also used : AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration)

Example 35 with AtomicConfiguration

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

the class GridCachePartitionedAtomicLongLoadTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
    AtomicConfiguration atomicCfg = new AtomicConfiguration();
    atomicCfg.setCacheMode(PARTITIONED);
    atomicCfg.setBackups(1);
    atomicCfg.setAtomicSequenceReserveSize(10);
    c.setAtomicConfiguration(atomicCfg);
    c.getTransactionConfiguration().setDefaultTxConcurrency(PESSIMISTIC);
    c.getTransactionConfiguration().setDefaultTxIsolation(REPEATABLE_READ);
    CacheConfiguration cc = defaultCacheConfiguration();
    cc.setCacheMode(CacheMode.PARTITIONED);
    cc.setRebalanceMode(CacheRebalanceMode.SYNC);
    cc.setWriteSynchronizationMode(FULL_SYNC);
    LruEvictionPolicy plc = new LruEvictionPolicy();
    plc.setMaxSize(1000);
    cc.setEvictionPolicy(plc);
    cc.setOnheapCacheEnabled(true);
    cc.setBackups(1);
    cc.setAffinity(new RendezvousAffinityFunction(true));
    c.setCacheConfiguration(cc);
    return c;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) AtomicConfiguration(org.apache.ignite.configuration.AtomicConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) LruEvictionPolicy(org.apache.ignite.cache.eviction.lru.LruEvictionPolicy)

Aggregations

AtomicConfiguration (org.apache.ignite.configuration.AtomicConfiguration)43 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)14 Test (org.junit.Test)11 Ignite (org.apache.ignite.Ignite)7 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)7 IgniteAtomicSequence (org.apache.ignite.IgniteAtomicSequence)5 RendezvousAffinityFunction (org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction)5 IgniteEx (org.apache.ignite.internal.IgniteEx)5 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)5 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)4 HashMap (java.util.HashMap)3 IgniteAtomicLong (org.apache.ignite.IgniteAtomicLong)3 LruEvictionPolicy (org.apache.ignite.cache.eviction.lru.LruEvictionPolicy)3 LinkedHashMap (java.util.LinkedHashMap)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 BinaryBasicNameMapper (org.apache.ignite.binary.BinaryBasicNameMapper)2 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)2 ExecutorConfiguration (org.apache.ignite.configuration.ExecutorConfiguration)2 TransactionConfiguration (org.apache.ignite.configuration.TransactionConfiguration)2 NoOpFailureHandler (org.apache.ignite.failure.NoOpFailureHandler)2