Search in sources :

Example 51 with ConnectorConfiguration

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

the class JdbcLocalCachesSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    CacheConfiguration cache = defaultCacheConfiguration();
    cache.setName(CACHE_NAME);
    cache.setCacheMode(LOCAL);
    cache.setWriteSynchronizationMode(FULL_SYNC);
    cache.setIndexedTypes(String.class, Integer.class);
    cfg.setCacheConfiguration(cache);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    cfg.setConnectorConfiguration(new ConnectorConfiguration());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 52 with ConnectorConfiguration

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

the class RestBinaryProtocolSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setLocalHost(HOST);
    assert cfg.getConnectorConfiguration() == null;
    ConnectorConfiguration clientCfg = new ConnectorConfiguration();
    clientCfg.setPort(PORT);
    cfg.setConnectorConfiguration(clientCfg);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME), cacheConfiguration(CACHE_NAME));
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 53 with ConnectorConfiguration

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

the class RedisCommonAbstractTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setLocalHost(HOST);
    assert cfg.getConnectorConfiguration() == null;
    ConnectorConfiguration redisCfg = new ConnectorConfiguration();
    redisCfg.setHost(HOST);
    redisCfg.setPort(PORT);
    cfg.setConnectorConfiguration(redisCfg);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    CacheConfiguration ccfg = defaultCacheConfiguration();
    ccfg.setStatisticsEnabled(true);
    ccfg.setIndexedTypes(String.class, String.class);
    ccfg.setName(DFLT_CACHE_NAME);
    cfg.setCacheConfiguration(ccfg);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 54 with ConnectorConfiguration

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

the class JdbcThinAbstractDmlStatementSelfTest method getConfiguration0.

/**
 * @param igniteInstanceName Ignite instance name.
 * @return Grid configuration used for starting the grid.
 * @throws Exception If failed.
 */
private IgniteConfiguration getConfiguration0(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(disco);
    cfg.setConnectorConfiguration(new ConnectorConfiguration());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 55 with ConnectorConfiguration

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

the class GridCommandHandlerTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setConnectorConfiguration(new ConnectorConfiguration());
    DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(100 * 1024 * 1024));
    cfg.setDataStorageConfiguration(memCfg);
    DataStorageConfiguration dsCfg = cfg.getDataStorageConfiguration();
    dsCfg.setWalMode(WALMode.LOG_ONLY);
    dsCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
    return cfg;
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ConnectorConfiguration(org.apache.ignite.configuration.ConnectorConfiguration)

Aggregations

ConnectorConfiguration (org.apache.ignite.configuration.ConnectorConfiguration)55 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)50 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)41 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)12 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)8 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)3 QueryEntity (org.apache.ignite.cache.QueryEntity)2 QueryIndex (org.apache.ignite.cache.QueryIndex)2 AffinityKey (org.apache.ignite.cache.affinity.AffinityKey)2 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)2 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)2 GridSslContextFactory (org.apache.ignite.internal.client.ssl.GridSslContextFactory)2 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)2 IOException (java.io.IOException)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 SSLContext (javax.net.ssl.SSLContext)1 SSLException (javax.net.ssl.SSLException)1 BinaryTypeConfiguration (org.apache.ignite.binary.BinaryTypeConfiguration)1 LruEvictionPolicy (org.apache.ignite.cache.eviction.lru.LruEvictionPolicy)1