Search in sources :

Example 66 with BinaryTypeConfiguration

use of org.apache.ignite.binary.BinaryTypeConfiguration in project ignite by apache.

the class GridCacheAffinityRoutingBinarySelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    BinaryTypeConfiguration typeCfg = new BinaryTypeConfiguration();
    typeCfg.setTypeName(AffinityTestKey.class.getName());
    CacheKeyConfiguration keyCfg = new CacheKeyConfiguration(AffinityTestKey.class.getName(), "affKey");
    cfg.setCacheKeyConfiguration(keyCfg);
    BinaryConfiguration bCfg = new BinaryConfiguration();
    bCfg.setTypeConfigurations(Collections.singleton(typeCfg));
    cfg.setBinaryConfiguration(bCfg);
    cfg.setMarshaller(new BinaryMarshaller());
    return cfg;
}
Also used : CacheKeyConfiguration(org.apache.ignite.cache.CacheKeyConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryConfiguration(org.apache.ignite.configuration.BinaryConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) BinaryTypeConfiguration(org.apache.ignite.binary.BinaryTypeConfiguration)

Example 67 with BinaryTypeConfiguration

use of org.apache.ignite.binary.BinaryTypeConfiguration in project ignite by apache.

the class GridCacheBinaryObjectsAbstractMultiThreadedSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
    CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    cacheCfg.setCacheMode(cacheMode());
    cacheCfg.setAtomicityMode(atomicityMode());
    cacheCfg.setNearConfiguration(nearConfiguration());
    cacheCfg.setWriteSynchronizationMode(writeSynchronizationMode());
    cfg.setCacheConfiguration(cacheCfg);
    BinaryConfiguration bCfg = new BinaryConfiguration();
    bCfg.setTypeConfigurations(Arrays.asList(new BinaryTypeConfiguration(TestObject.class.getName())));
    cfg.setBinaryConfiguration(bCfg);
    cfg.setMarshaller(new BinaryMarshaller());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryConfiguration(org.apache.ignite.configuration.BinaryConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) BinaryTypeConfiguration(org.apache.ignite.binary.BinaryTypeConfiguration) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

BinaryTypeConfiguration (org.apache.ignite.binary.BinaryTypeConfiguration)67 BinaryObject (org.apache.ignite.binary.BinaryObject)25 BinaryIdMapper (org.apache.ignite.binary.BinaryIdMapper)21 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)18 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)16 BinaryBasicNameMapper (org.apache.ignite.binary.BinaryBasicNameMapper)11 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)8 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)8 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)8 HashMap (java.util.HashMap)7 LinkedHashMap (java.util.LinkedHashMap)7 BinaryBasicIdMapper (org.apache.ignite.binary.BinaryBasicIdMapper)7 BigInteger (java.math.BigInteger)6 ArrayList (java.util.ArrayList)6 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)6 CacheKeyConfiguration (org.apache.ignite.cache.CacheKeyConfiguration)5 UUID (java.util.UUID)4 Date (java.util.Date)3 Map (java.util.Map)3 TreeMap (java.util.TreeMap)3