Package com.hazelcast.config

Examples of com.hazelcast.config.MultiMapConfig


    public int getClassId() {
        return MultiMapPortableHook.TXN_MM_GET;
    }

    private Collection<Data> createCollection(int size) {
        final MultiMapConfig config = getClientEngine().getConfig().findMultiMapConfig(name);
        if (config.getValueCollectionType().equals(MultiMapConfig.ValueCollectionType.SET)) {
            return new HashSet<Data>(size);
        } else if (config.getValueCollectionType().equals(MultiMapConfig.ValueCollectionType.LIST)) {
            return new ArrayList<Data>(size);
        }
        return null;
    }
View Full Code Here


    }

    public final MultiMapConfig.ValueCollectionType getValueCollectionType(MultiMapContainer container) {
        checkNotNull(container, "Argument container should not be null");

        MultiMapConfig config = container.getConfig();
        return config.getValueCollectionType();

    }
View Full Code Here

        if (lockService != null) {
            lockService.registerLockStoreConstructor(SERVICE_NAME,
                    new ConstructorFunction<ObjectNamespace, LockStoreInfo>() {
                        public LockStoreInfo createNew(final ObjectNamespace key) {
                            String name = key.getObjectName();
                            final MultiMapConfig multiMapConfig = nodeEngine.getConfig().findMultiMapConfig(name);

                            return new LockStoreInfo() {
                                public int getBackupCount() {
                                    return multiMapConfig.getSyncBackupCount();
                                }

                                public int getAsyncBackupCount() {
                                    return multiMapConfig.getAsyncBackupCount();
                                }
                            };
                        }
                    });
        }
View Full Code Here

    @BeforeClass
    public static void init() {

        Config config = new Config();
        MultiMapConfig multiMapConfig = config.getMultiMapConfig(multiMapBackedByList);
        multiMapConfig.setValueCollectionType(MultiMapConfig.ValueCollectionType.LIST);

        server = Hazelcast.newHazelcastInstance(config);
        client = HazelcastClient.newHazelcastClient();
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.config.MultiMapConfig

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.