Package com.hazelcast.nio.serialization

Examples of com.hazelcast.nio.serialization.PortableFactory


    public int getFactoryId() {
        return F_ID;
    }

    public PortableFactory createFactory() {
        return new PortableFactory() {
            final ConstructorFunction<Integer, Portable>[] constructors = new ConstructorFunction[LEN];

            {
                constructors[GET] = new ConstructorFunction<Integer, Portable>() {
                    public Portable createNew(Integer arg) {
View Full Code Here


        return ID;
    }

    @Override
    public PortableFactory createFactory() {
        return new PortableFactory() {
            public Portable create(int classId) {
                switch (classId) {
                    case USERNAME_PWD_CRED:
                        return new UsernamePasswordCredentials();
                    case COLLECTION:
View Full Code Here

    @Test
    public void testPortableKeysetAndValuesWithPredicates() throws Exception {
        final String mapName = randomString();
        final Config config = new Config();
        config.getSerializationConfig().addPortableFactory(666, new PortableFactory() {
            public Portable create(int classId) {
                return new SampleObjects.PortableEmployee();
            }
        });
        final HazelcastInstance instance = createHazelcastInstance(config);
View Full Code Here

    @Test
    public void testClientPortableWithoutRegisteringToNode() {
        Hazelcast.newHazelcastInstance();
        final SerializationConfig serializationConfig = new SerializationConfig();
        serializationConfig.addPortableFactory(5, new PortableFactory() {
            public Portable create(int classId) {
                return new SamplePortable();
            }
        });
        final ClientConfig clientConfig = new ClientConfig();
View Full Code Here

TOP

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

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.