Search in sources :

Example 16 with BinaryBasicIdMapper

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

the class GridDefaultBinaryMappersBinaryMetaDataSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    BinaryConfiguration bCfg = new BinaryConfiguration();
    bCfg.setNameMapper(new BinaryBasicNameMapper(false));
    bCfg.setIdMapper(new BinaryBasicIdMapper(false));
    bCfg.setClassNames(Arrays.asList(TestObject1.class.getName(), TestObject2.class.getName()));
    cfg.setBinaryConfiguration(bCfg);
    cfg.setMarshaller(new BinaryMarshaller());
    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    cfg.setCacheConfiguration(ccfg);
    GridDefaultBinaryMappersBinaryMetaDataSelfTest.cfg = cfg;
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryConfiguration(org.apache.ignite.configuration.BinaryConfiguration) BinaryBasicNameMapper(org.apache.ignite.binary.BinaryBasicNameMapper) BinaryBasicIdMapper(org.apache.ignite.binary.BinaryBasicIdMapper) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration)

Example 17 with BinaryBasicIdMapper

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

the class GridSimpleLowerCaseBinaryMappersBinaryMetaDataSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    BinaryConfiguration bCfg = cfg.getBinaryConfiguration();
    bCfg.setNameMapper(new BinaryBasicNameMapper());
    bCfg.setIdMapper(new BinaryBasicIdMapper(true));
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryConfiguration(org.apache.ignite.configuration.BinaryConfiguration) BinaryBasicNameMapper(org.apache.ignite.binary.BinaryBasicNameMapper) BinaryBasicIdMapper(org.apache.ignite.binary.BinaryBasicIdMapper)

Example 18 with BinaryBasicIdMapper

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

the class GridCacheBinaryStoreBinariesSimpleNameMappersSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    BinaryConfiguration bCfg = cfg.getBinaryConfiguration();
    bCfg.setNameMapper(new BinaryBasicNameMapper());
    bCfg.setIdMapper(new BinaryBasicIdMapper(true));
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryConfiguration(org.apache.ignite.configuration.BinaryConfiguration) BinaryBasicNameMapper(org.apache.ignite.binary.BinaryBasicNameMapper) BinaryBasicIdMapper(org.apache.ignite.binary.BinaryBasicIdMapper)

Aggregations

BinaryBasicIdMapper (org.apache.ignite.binary.BinaryBasicIdMapper)18 BinaryBasicNameMapper (org.apache.ignite.binary.BinaryBasicNameMapper)14 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)9 BinaryIdMapper (org.apache.ignite.binary.BinaryIdMapper)7 BinaryTypeConfiguration (org.apache.ignite.binary.BinaryTypeConfiguration)7 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)7 BinaryObjectException (org.apache.ignite.binary.BinaryObjectException)2 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)2 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)2 GridBinaryTestClass1 (org.apache.ignite.internal.binary.test.GridBinaryTestClass1)2 HashMap (java.util.HashMap)1 IgniteException (org.apache.ignite.IgniteException)1 BinaryNameMapper (org.apache.ignite.binary.BinaryNameMapper)1 BinaryReader (org.apache.ignite.binary.BinaryReader)1 BinarySerializer (org.apache.ignite.binary.BinarySerializer)1 BinaryWriter (org.apache.ignite.binary.BinaryWriter)1 PlatformConfiguration (org.apache.ignite.configuration.PlatformConfiguration)1 PlatformMemoryManagerImpl (org.apache.ignite.internal.processors.platform.memory.PlatformMemoryManagerImpl)1 Marshaller (org.apache.ignite.marshaller.Marshaller)1 PlatformCppConfiguration (org.apache.ignite.platform.cpp.PlatformCppConfiguration)1