use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class ClientTcpTaskExecutionAfterTopologyRestartSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setLocalHost("127.0.0.1");
assert cfg.getConnectorConfiguration() == null;
ConnectorConfiguration clientCfg = new ConnectorConfiguration();
clientCfg.setPort(PORT);
cfg.setConnectorConfiguration(clientCfg);
return cfg;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class CacheJdbcPojoStoreAbstractSelfTest 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());
cfg.setMarshaller(marshaller());
ConnectorConfiguration connCfg = new ConnectorConfiguration();
cfg.setConnectorConfiguration(connCfg);
return cfg;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class BinaryConfigurationCustomSerializerSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
cfg.setMarshaller(new BinaryMarshaller());
BinaryConfiguration binaryCfg = new BinaryConfiguration();
BinaryTypeConfiguration btc = new BinaryTypeConfiguration("org.MyClass");
btc.setIdMapper(BinaryContext.defaultIdMapper());
btc.setEnum(false);
// Set custom serializer that is unknown for Optimized marshaller.
btc.setSerializer(new MyBinarySerializer());
binaryCfg.setTypeConfigurations(Collections.singletonList(btc));
cfg.setBinaryConfiguration(binaryCfg);
// Set custom consistent ID that unknown for Optimized marshaller.
cfg.setConsistentId(new MyConsistentId("test"));
cfg.setCacheConfiguration(new CacheConfiguration("TEST"));
return cfg;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class MemcacheRestExampleNodeStartup method configuration.
/**
* Create Ignite configuration with IGFS and enabled IPC.
*
* @return Ignite configuration.
* @throws IgniteException If configuration creation failed.
*/
public static IgniteConfiguration configuration() throws IgniteException {
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setLocalHost("127.0.0.1");
cfg.setDeploymentMode(SHARED);
cfg.setPeerClassLoadingEnabled(true);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
CacheConfiguration cacheCfg = new CacheConfiguration();
cacheCfg.setName("default");
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
cacheCfg.setRebalanceMode(SYNC);
cacheCfg.setAtomicityMode(TRANSACTIONAL);
cfg.setCacheConfiguration(cacheCfg);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Collections.singletonList("127.0.0.1:47500..47509"));
discoSpi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(discoSpi);
return cfg;
}
use of org.apache.ignite.configuration.ConnectorConfiguration in project ignite by apache.
the class TaskEventSubjectIdSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setConnectorConfiguration(new ConnectorConfiguration());
return cfg;
}
Aggregations