use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class CacheGetFutureHangsSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
cfg.setMarshaller(new BinaryMarshaller());
CacheConfiguration ccfg = defaultCacheConfiguration();
ccfg.setCacheMode(CacheMode.PARTITIONED);
ccfg.setBackups(1);
ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
ccfg.setWriteSynchronizationMode(PRIMARY_SYNC);
ccfg.setNearConfiguration(null);
cfg.setCacheConfiguration(ccfg);
return cfg;
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class DynamicProxySerializationMultiJvmSelfTest method testToBinary.
/**
* @throws Exception If failed.
*/
public void testToBinary() throws Exception {
marshFactory = new Callable<Marshaller>() {
@Override
public Marshaller call() throws Exception {
return new BinaryMarshaller();
}
};
Ignite ignite = startGrid(0);
MyProxy p = create();
MyProxy p0 = ignite.binary().toBinary(p);
assertSame(p, p0);
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class DynamicProxySerializationMultiJvmSelfTest method testBinaryField.
/**
* @throws Exception If failed.
*/
public void testBinaryField() throws Exception {
marshFactory = new Callable<Marshaller>() {
@Override
public Marshaller call() throws Exception {
return new BinaryMarshaller();
}
};
Ignite ignite = startGrids(2);
BinaryObject bo = ignite.binary().builder("ProxyWrapper").setField("proxy", create()).build();
int val = ignite.compute(ignite.cluster().forRemotes()).call(new FieldTestCallable(bo));
assertEquals(42, val);
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class DynamicProxySerializationMultiJvmSelfTest method testBinaryMarshaller.
/**
* @throws Exception If failed.
*/
public void testBinaryMarshaller() throws Exception {
marshFactory = new Callable<Marshaller>() {
@Override
public Marshaller call() throws Exception {
return new BinaryMarshaller();
}
};
doTestMarshaller();
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class IgniteMessagingWithClientTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setMarshaller(new BinaryMarshaller());
if (igniteInstanceName.equals(getTestIgniteInstanceName(2))) {
cfg.setClientMode(true);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setForceServerMode(true);
}
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
return cfg;
}
Aggregations