use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class IgniteExternalizableAbstractTest method getMarshallers.
/**
* @return Marshallers.
*/
protected List<Marshaller> getMarshallers() throws IgniteCheckedException {
List<Marshaller> marshallers = new ArrayList<>();
BinaryMarshaller bin = createStandaloneBinaryMarshaller();
marshallers.add(new JdkMarshaller());
marshallers.add(bin);
return marshallers;
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class CacheEnumOperationsAbstractTest method assertBinaryEnum.
/**
* @param cache Cache.
* @param key Key.
* @param expVal Expected value.
*/
private static void assertBinaryEnum(IgniteCache<Object, Object> cache, int key, TestEnum expVal) {
Marshaller marsh = ((IgniteCacheProxy) cache).context().marshaller();
if (marsh instanceof BinaryMarshaller) {
BinaryObject enumObj = (BinaryObject) cache.withKeepBinary().get(key);
assertEquals(expVal.ordinal(), enumObj.enumOrdinal());
assertTrue(enumObj.type().isEnum());
assertTrue(enumObj instanceof BinaryEnumObjectImpl);
}
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class CacheKeepBinaryTransactionTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(gridName);
TransactionConfiguration txCfg = new TransactionConfiguration();
txCfg.setDefaultTxConcurrency(TransactionConcurrency.OPTIMISTIC);
txCfg.setDefaultTxIsolation(TransactionIsolation.REPEATABLE_READ);
cfg.setTransactionConfiguration(txCfg);
cfg.setMarshaller(new BinaryMarshaller());
CacheConfiguration ccfg = new CacheConfiguration("tx-cache");
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cfg.setCacheConfiguration(ccfg);
return cfg;
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class GridManagerStopSelfTest method testStopCommunicationManager.
/**
* @throws Exception If failed.
*/
public void testStopCommunicationManager() throws Exception {
CommunicationSpi spi = new TcpCommunicationSpi();
injectLogger(spi);
ctx.config().setCommunicationSpi(spi);
ctx.config().setMarshaller(new BinaryMarshaller());
GridIoManager mgr = new GridIoManager(ctx);
mgr.onKernalStop(true);
mgr.stop(false);
}
use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.
the class GridCacheStoreManagerDeserializationTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception {
IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
if (igniteInstanceName != null && igniteInstanceName.toLowerCase().startsWith("binary"))
c.setMarshaller(new BinaryMarshaller());
else
c.setMarshaller(new JdkMarshaller());
TcpDiscoverySpi disco = new TcpDiscoverySpi();
disco.setIpFinder(IP_FINDER);
c.setDiscoverySpi(disco);
c.setCacheConfiguration(cacheConfiguration());
return c;
}
Aggregations