Search in sources :

Example 6 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class PlatformUtils method marshaller.

/**
     * Create binary marshaller.
     *
     * @return Marshaller.
     */
@SuppressWarnings("deprecation")
public static GridBinaryMarshaller marshaller() {
    BinaryContext ctx = new BinaryContext(BinaryNoopMetadataHandler.instance(), new IgniteConfiguration(), new NullLogger());
    BinaryMarshaller marsh = new BinaryMarshaller();
    marsh.setContext(new MarshallerContextImpl(null));
    ctx.configure(marsh, new IgniteConfiguration());
    return new GridBinaryMarshaller(ctx);
}
Also used : MarshallerContextImpl(org.apache.ignite.internal.MarshallerContextImpl) NullLogger(org.apache.ignite.logger.NullLogger) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) GridBinaryMarshaller(org.apache.ignite.internal.binary.GridBinaryMarshaller) GridBinaryMarshaller(org.apache.ignite.internal.binary.GridBinaryMarshaller) BinaryContext(org.apache.ignite.internal.binary.BinaryContext)

Example 7 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setMarshaller(new BinaryMarshaller());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller)

Example 8 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class GridCacheClientNodeBinaryObjectMetadataMultinodeTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setPeerClassLoadingEnabled(false);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder).setForceServerMode(true);
    cfg.setMarshaller(new BinaryMarshaller());
    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
    ccfg.setWriteSynchronizationMode(FULL_SYNC);
    cfg.setCacheConfiguration(ccfg);
    cfg.setClientMode(client);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration)

Example 9 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class GridDiscoveryManagerAttributesSelfTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    if (igniteInstanceName.equals(getTestIgniteInstanceName(1)))
        cfg.setClientMode(true);
    if (binaryMarshallerEnabled)
        cfg.setMarshaller(new BinaryMarshaller());
    cfg.setIncludeProperties(PREFER_IPV4);
    cfg.setDeploymentMode(mode);
    cfg.setPeerClassLoadingEnabled(p2pEnabled);
    TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
    discoverySpi.setIpFinder(IP_FINDER);
    cfg.setDiscoverySpi(discoverySpi);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 10 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class IgniteCacheStarvationOnRebalanceTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    // Use small system thread pool to reproduce the issue.
    cfg.setSystemThreadPoolSize(IGNITE_THREAD_POOL_SIZE);
    cfg.setMarshaller(new BinaryMarshaller());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller)

Aggregations

BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)87 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)56 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)30 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)21 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)12 Ignite (org.apache.ignite.Ignite)9 ArrayList (java.util.ArrayList)8 BinaryTypeConfiguration (org.apache.ignite.binary.BinaryTypeConfiguration)8 GridBinaryMarshaller (org.apache.ignite.internal.binary.GridBinaryMarshaller)8 BinaryContext (org.apache.ignite.internal.binary.BinaryContext)7 BinaryObject (org.apache.ignite.binary.BinaryObject)6 NullLogger (org.apache.ignite.logger.NullLogger)6 Marshaller (org.apache.ignite.marshaller.Marshaller)6 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)5 MarshallerContextTestImpl (org.apache.ignite.marshaller.MarshallerContextTestImpl)5 Connection (java.sql.Connection)4 ResultSet (java.sql.ResultSet)4 HashMap (java.util.HashMap)4 IgniteException (org.apache.ignite.IgniteException)4 CacheKeyConfiguration (org.apache.ignite.cache.CacheKeyConfiguration)4