Package com.hazelcast.nio.serialization

Examples of com.hazelcast.nio.serialization.DefaultSerializationServiceBuilder


    }

    @Test
    public void testInitableIterator() {
        int testSize = 3007;
        SerializationService ss = new DefaultSerializationServiceBuilder().build();
        for (int fetchSize = 1; fetchSize < 102; fetchSize++) {
            CacheConcurrentHashMap<Data, String> cmap = new CacheConcurrentHashMap<Data, String>(1000);
            for (int i = 0; i < testSize; i++) {
                Integer key = i;
                Data data = ss.toData(key);
View Full Code Here


    SerializationService service;

    @Before
    public void setup() {
        SerializationServiceBuilder builder = new DefaultSerializationServiceBuilder();
        service = builder.build();
    }
View Full Code Here

        }
    }

    @Test
    public void testComplexObject() throws Exception {
        SerializationService ss = new DefaultSerializationServiceBuilder().build();

        ComplexUtf8Object complexUtf8Object = buildComplexUtf8Object();
        ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
        ObjectDataOutput out = ss.createObjectDataOutputStream(baos);
        out.writeObject(complexUtf8Object);
View Full Code Here

        }
    }

    @Test
    public void testIssue2674_multibyte_char_at_position_that_even_multiple_of_buffer_size() throws Exception {
        SerializationService serializationService = new DefaultSerializationServiceBuilder().build();

        for (int i : new int[]{50240, 100240, 80240}) {
            String originalString = createString(i);
            BufferObjectDataOutput dataOutput = serializationService.createObjectDataOutput(100000);
            dataOutput.writeUTF(originalString);
View Full Code Here

        }
    }

    @Test
    public void testIssue2705_integer_overflow_on_old_version_multicast_package() throws Exception {
        SerializationService serializationService = new DefaultSerializationServiceBuilder().build();

        ByteArrayOutputStream baos = new ByteArrayOutputStream(64000);
        byte[] temp = new byte[1024];
        InputStream is = UTFEncoderDecoderTest.class.getResourceAsStream("hz-3.1.5-multicast-package.dump");
        int length;
View Full Code Here

        assertEquals(0, queue.size());
    }

    private void fillQueue(WriteBehindQueue queue, int numberOfItems) {
        SerializationService ss1 = new DefaultSerializationServiceBuilder().build();
        final long storeTime = Clock.currentTimeMillis();
        for (int i = 0; i < numberOfItems; i++) {
            final DelayedEntry<Data, Object> e = DelayedEntry.createWithNullValue(ss1.toData(i), storeTime, i);
            queue.offer(e);
        }
View Full Code Here

            ClassLoader configClassLoader = node.getConfigClassLoader();

            HazelcastInstanceImpl hazelcastInstance = node.hazelcastInstance;
            PartitioningStrategy partitioningStrategy = getPartitioningStrategy(configClassLoader);

            SerializationServiceBuilder builder = new DefaultSerializationServiceBuilder();
            SerializationConfig serializationConfig = config.getSerializationConfig() != null
                    ? config.getSerializationConfig() : new SerializationConfig();

            ss = builder.setClassLoader(configClassLoader)
                    .setConfig(serializationConfig)
                    .setManagedContext(hazelcastInstance.managedContext)
                    .setPartitioningStrategy(partitioningStrategy)
                    .setHazelcastInstance(hazelcastInstance)
                    .build();
View Full Code Here

            ClassLoader configClassLoader = config.getClassLoader();

            HazelcastInstance hazelcastInstance = client;
            PartitioningStrategy partitioningStrategy = getPartitioningStrategy(configClassLoader);

            SerializationServiceBuilder builder = new DefaultSerializationServiceBuilder();
            SerializationConfig serializationConfig = config.getSerializationConfig() != null ? config
                    .getSerializationConfig() : new SerializationConfig();
            ss = builder.setClassLoader(configClassLoader)
                    .setConfig(serializationConfig)
                    .setManagedContext(new HazelcastClientManagedContext(client, config.getManagedContext()))
                    .setPartitioningStrategy(partitioningStrategy)
                    .setHazelcastInstance(hazelcastInstance)
                    .build();
View Full Code Here

TOP

Related Classes of com.hazelcast.nio.serialization.DefaultSerializationServiceBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.