Search in sources :

Example 1 with DiskTierConfig

use of com.hazelcast.config.DiskTierConfig in project hazelcast by hazelcast.

the class TestFullApplicationContext method testMapConfig.

@Test
public void testMapConfig() {
    assertNotNull(config);
    long mapConfigSize = config.getMapConfigs().keySet().stream().filter(name -> !name.startsWith(INTERNAL_JET_OBJECTS_PREFIX)).count();
    assertEquals(27, mapConfigSize);
    MapConfig testMapConfig = config.getMapConfig("testMap");
    assertNotNull(testMapConfig);
    assertEquals("testMap", testMapConfig.getName());
    assertEquals(2, testMapConfig.getBackupCount());
    assertEquals(EvictionPolicy.NONE, testMapConfig.getEvictionConfig().getEvictionPolicy());
    assertEquals(Integer.MAX_VALUE, testMapConfig.getEvictionConfig().getSize());
    assertEquals(0, testMapConfig.getTimeToLiveSeconds());
    assertTrue(testMapConfig.getMerkleTreeConfig().isEnabled());
    assertEquals(20, testMapConfig.getMerkleTreeConfig().getDepth());
    assertTrue(testMapConfig.getDataPersistenceConfig().isEnabled());
    assertTrue(testMapConfig.getDataPersistenceConfig().isFsync());
    EventJournalConfig journalConfig = testMapConfig.getEventJournalConfig();
    assertTrue(journalConfig.isEnabled());
    assertEquals(123, journalConfig.getCapacity());
    assertEquals(321, journalConfig.getTimeToLiveSeconds());
    assertEquals(MetadataPolicy.OFF, testMapConfig.getMetadataPolicy());
    assertTrue(testMapConfig.isReadBackupData());
    assertEquals(2, testMapConfig.getIndexConfigs().size());
    for (IndexConfig index : testMapConfig.getIndexConfigs()) {
        if ("name".equals(index.getAttributes().get(0))) {
            assertEquals(IndexType.HASH, index.getType());
            assertNull(index.getName());
        } else if ("age".equals(index.getAttributes().get(0))) {
            assertEquals(IndexType.SORTED, index.getType());
            assertEquals("sortedIndex", index.getName());
            assertEquals("name", index.getAttributes().get(1));
        } else {
            fail("unknown index!");
        }
    }
    assertEquals(2, testMapConfig.getAttributeConfigs().size());
    for (AttributeConfig attribute : testMapConfig.getAttributeConfigs()) {
        if ("power".equals(attribute.getName())) {
            assertEquals("com.car.PowerExtractor", attribute.getExtractorClassName());
        } else if ("weight".equals(attribute.getName())) {
            assertEquals("com.car.WeightExtractor", attribute.getExtractorClassName());
        } else {
            fail("unknown attribute!");
        }
    }
    assertEquals("my-split-brain-protection", testMapConfig.getSplitBrainProtectionName());
    MergePolicyConfig mergePolicyConfig = testMapConfig.getMergePolicyConfig();
    assertNotNull(mergePolicyConfig);
    assertEquals("PassThroughMergePolicy", mergePolicyConfig.getPolicy());
    assertEquals(2342, mergePolicyConfig.getBatchSize());
    // test that the testMapConfig has a mapStoreConfig and it is correct
    MapStoreConfig testMapStoreConfig = testMapConfig.getMapStoreConfig();
    assertNotNull(testMapStoreConfig);
    assertEquals("com.hazelcast.spring.DummyStore", testMapStoreConfig.getClassName());
    assertTrue(testMapStoreConfig.isEnabled());
    assertEquals(0, testMapStoreConfig.getWriteDelaySeconds());
    assertEquals(10, testMapStoreConfig.getWriteBatchSize());
    assertTrue(testMapStoreConfig.isWriteCoalescing());
    assertEquals(MapStoreConfig.InitialLoadMode.EAGER, testMapStoreConfig.getInitialLoadMode());
    // test that the testMapConfig has a nearCacheConfig and it is correct
    NearCacheConfig testNearCacheConfig = testMapConfig.getNearCacheConfig();
    assertNotNull(testNearCacheConfig);
    assertEquals(0, testNearCacheConfig.getTimeToLiveSeconds());
    assertEquals(60, testNearCacheConfig.getMaxIdleSeconds());
    assertEquals(EvictionPolicy.LRU, testNearCacheConfig.getEvictionConfig().getEvictionPolicy());
    assertEquals(5000, testNearCacheConfig.getEvictionConfig().getSize());
    assertTrue(testNearCacheConfig.isInvalidateOnChange());
    assertFalse(testNearCacheConfig.isSerializeKeys());
    // test that the testMapConfig2's mapStoreConfig implementation
    MapConfig testMapConfig2 = config.getMapConfig("testMap2");
    assertNotNull(testMapConfig2.getMapStoreConfig().getImplementation());
    assertEquals(dummyMapStore, testMapConfig2.getMapStoreConfig().getImplementation());
    assertEquals(MapStoreConfig.InitialLoadMode.LAZY, testMapConfig2.getMapStoreConfig().getInitialLoadMode());
    // test testMapConfig2's WanReplicationConfig
    WanReplicationRef wanReplicationRef = testMapConfig2.getWanReplicationRef();
    assertEquals("testWan", wanReplicationRef.getName());
    assertEquals("PutIfAbsentMergePolicy", wanReplicationRef.getMergePolicyClassName());
    assertTrue(wanReplicationRef.isRepublishingEnabled());
    assertEquals(1000, testMapConfig2.getEvictionConfig().getSize());
    assertEquals(MaxSizePolicy.PER_NODE, testMapConfig2.getEvictionConfig().getMaxSizePolicy());
    assertEquals(2, testMapConfig2.getEntryListenerConfigs().size());
    for (EntryListenerConfig listener : testMapConfig2.getEntryListenerConfigs()) {
        if (listener.getClassName() != null) {
            assertNull(listener.getImplementation());
            assertTrue(listener.isIncludeValue());
            assertFalse(listener.isLocal());
        } else {
            assertNotNull(listener.getImplementation());
            assertEquals(entryListener, listener.getImplementation());
            assertTrue(listener.isLocal());
            assertTrue(listener.isIncludeValue());
        }
    }
    MapConfig simpleMapConfig = config.getMapConfig("simpleMap");
    assertNotNull(simpleMapConfig);
    assertEquals("simpleMap", simpleMapConfig.getName());
    assertEquals(3, simpleMapConfig.getBackupCount());
    assertEquals(1, simpleMapConfig.getAsyncBackupCount());
    assertEquals(EvictionPolicy.LRU, simpleMapConfig.getEvictionConfig().getEvictionPolicy());
    assertEquals(10, simpleMapConfig.getEvictionConfig().getSize());
    assertEquals(1, simpleMapConfig.getTimeToLiveSeconds());
    // test that the simpleMapConfig does NOT have a nearCacheConfig
    assertNull(simpleMapConfig.getNearCacheConfig());
    MapConfig testMapConfig3 = config.getMapConfig("testMap3");
    assertEquals("com.hazelcast.spring.DummyStoreFactory", testMapConfig3.getMapStoreConfig().getFactoryClassName());
    assertFalse(testMapConfig3.getMapStoreConfig().getProperties().isEmpty());
    assertEquals(testMapConfig3.getMapStoreConfig().getProperty("dummy.property"), "value");
    MapConfig testMapConfig4 = config.getMapConfig("testMap4");
    assertEquals(dummyMapStoreFactory, testMapConfig4.getMapStoreConfig().getFactoryImplementation());
    MapConfig mapWithValueCachingSetToNever = config.getMapConfig("mapWithValueCachingSetToNever");
    assertEquals(CacheDeserializedValues.NEVER, mapWithValueCachingSetToNever.getCacheDeserializedValues());
    MapConfig mapWithValueCachingSetToAlways = config.getMapConfig("mapWithValueCachingSetToAlways");
    assertEquals(CacheDeserializedValues.ALWAYS, mapWithValueCachingSetToAlways.getCacheDeserializedValues());
    MapConfig mapWithDefaultValueCaching = config.getMapConfig("mapWithDefaultValueCaching");
    assertEquals(CacheDeserializedValues.INDEX_ONLY, mapWithDefaultValueCaching.getCacheDeserializedValues());
    MapConfig testMapWithPartitionLostListenerConfig = config.getMapConfig("mapWithPartitionLostListener");
    List<MapPartitionLostListenerConfig> partitionLostListenerConfigs = testMapWithPartitionLostListenerConfig.getPartitionLostListenerConfigs();
    assertEquals(1, partitionLostListenerConfigs.size());
    assertEquals("DummyMapPartitionLostListenerImpl", partitionLostListenerConfigs.get(0).getClassName());
    MapConfig testMapWithPartitionStrategyConfig = config.getMapConfig("mapWithPartitionStrategy");
    assertEquals("com.hazelcast.spring.DummyPartitionStrategy", testMapWithPartitionStrategyConfig.getPartitioningStrategyConfig().getPartitioningStrategyClass());
    MapConfig testMapConfig5 = config.getMapConfig("testMap5");
    TieredStoreConfig tieredStoreConfig = testMapConfig5.getTieredStoreConfig();
    assertTrue(tieredStoreConfig.isEnabled());
    MemoryTierConfig memoryTierConfig = tieredStoreConfig.getMemoryTierConfig();
    assertEquals(MemoryUnit.MEGABYTES, memoryTierConfig.getCapacity().getUnit());
    assertEquals(128L, memoryTierConfig.getCapacity().getValue());
    DiskTierConfig diskTierConfig = tieredStoreConfig.getDiskTierConfig();
    assertTrue(diskTierConfig.isEnabled());
    assertEquals("the-local0751", diskTierConfig.getDeviceName());
}
Also used : WanAcknowledgeType(com.hazelcast.config.WanAcknowledgeType) ListConfig(com.hazelcast.config.ListConfig) Arrays(java.util.Arrays) QueueStore(com.hazelcast.collection.QueueStore) PermissionConfig(com.hazelcast.config.PermissionConfig) ICountDownLatch(com.hazelcast.cp.ICountDownLatch) MERGE_FIRST_RUN_DELAY_SECONDS(com.hazelcast.spi.properties.ClusterProperty.MERGE_FIRST_RUN_DELAY_SECONDS) Autowired(org.springframework.beans.factory.annotation.Autowired) AwsConfig(com.hazelcast.config.AwsConfig) SSLContextFactory(com.hazelcast.nio.ssl.SSLContextFactory) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) DynamicConfigurationConfig(com.hazelcast.config.DynamicConfigurationConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) SerializationConfig(com.hazelcast.config.SerializationConfig) KubernetesConfig(com.hazelcast.config.KubernetesConfig) MapConfig(com.hazelcast.config.MapConfig) JetService(com.hazelcast.jet.JetService) SemaphoreConfig(com.hazelcast.config.cp.SemaphoreConfig) Map(java.util.Map) PersistenceConfig(com.hazelcast.config.PersistenceConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) RaftAlgorithmConfig(com.hazelcast.config.cp.RaftAlgorithmConfig) MemcacheProtocolConfig(com.hazelcast.config.MemcacheProtocolConfig) DiscoveryStrategyConfig(com.hazelcast.config.DiscoveryStrategyConfig) ReplicatedMap(com.hazelcast.replicatedmap.ReplicatedMap) AfterClass(org.junit.AfterClass) MapStoreFactory(com.hazelcast.map.MapStoreFactory) KerberosIdentityConfig(com.hazelcast.config.security.KerberosIdentityConfig) Resource(javax.annotation.Resource) Set(java.util.Set) DummyReflectiveSerializable(com.hazelcast.spring.serialization.DummyReflectiveSerializable) Category(org.junit.experimental.categories.Category) MetricsConfig(com.hazelcast.config.MetricsConfig) ByteOrder(java.nio.ByteOrder) NearCacheConfig(com.hazelcast.config.NearCacheConfig) Assert.assertFalse(org.junit.Assert.assertFalse) MemberGroupConfig(com.hazelcast.config.MemberGroupConfig) CompactSerializationConfigAccessor(com.hazelcast.config.CompactSerializationConfigAccessor) MapStoreConfig(com.hazelcast.config.MapStoreConfig) KerberosAuthenticationConfig(com.hazelcast.config.security.KerberosAuthenticationConfig) DataSerializableFactory(com.hazelcast.nio.serialization.DataSerializableFactory) LocalDeviceConfig(com.hazelcast.config.LocalDeviceConfig) MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) RealmConfig(com.hazelcast.config.security.RealmConfig) TRUE(java.lang.Boolean.TRUE) MemberAddressProviderConfig(com.hazelcast.config.MemberAddressProviderConfig) RingbufferStoreConfig(com.hazelcast.config.RingbufferStoreConfig) WanConsumerConfig(com.hazelcast.config.WanConsumerConfig) AttributeConfig(com.hazelcast.config.AttributeConfig) EdgeConfig(com.hazelcast.jet.config.EdgeConfig) PARTITION_COUNT(com.hazelcast.spi.properties.ClusterProperty.PARTITION_COUNT) InstanceTrackingConfig(com.hazelcast.config.InstanceTrackingConfig) PNCounterConfig(com.hazelcast.config.PNCounterConfig) RunWith(org.junit.runner.RunWith) InMemoryFormat(com.hazelcast.config.InMemoryFormat) RestApiConfig(com.hazelcast.config.RestApiConfig) WanSyncConfig(com.hazelcast.config.WanSyncConfig) IcmpFailureDetectorConfig(com.hazelcast.config.IcmpFailureDetectorConfig) MapStore(com.hazelcast.map.MapStore) JavaSerializationFilterConfig(com.hazelcast.config.JavaSerializationFilterConfig) OnJoinPermissionOperationName(com.hazelcast.config.OnJoinPermissionOperationName) ISet(com.hazelcast.collection.ISet) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) SqlConfig(com.hazelcast.config.SqlConfig) WanCustomPublisherConfig(com.hazelcast.config.WanCustomPublisherConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) EvictionConfig(com.hazelcast.config.EvictionConfig) SerializerConfig(com.hazelcast.config.SerializerConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) ITopic(com.hazelcast.topic.ITopic) IntegrityCheckerConfig(com.hazelcast.config.IntegrityCheckerConfig) TopicConfig(com.hazelcast.config.TopicConfig) RecentlyActiveSplitBrainProtectionFunction(com.hazelcast.splitbrainprotection.impl.RecentlyActiveSplitBrainProtectionFunction) Before(org.junit.Before) HazelcastInstance(com.hazelcast.core.HazelcastInstance) JetConfig(com.hazelcast.jet.config.JetConfig) ConsistencyCheckStrategy(com.hazelcast.config.ConsistencyCheckStrategy) TriTuple(com.hazelcast.internal.util.TriTuple) Properties(java.util.Properties) SymmetricEncryptionConfig(com.hazelcast.config.SymmetricEncryptionConfig) MemoryUnit(com.hazelcast.memory.MemoryUnit) Assert.assertTrue(org.junit.Assert.assertTrue) DiscoveryConfig(com.hazelcast.config.DiscoveryConfig) Test(org.junit.Test) File(java.io.File) RingbufferStoreFactory(com.hazelcast.ringbuffer.RingbufferStoreFactory) EurekaConfig(com.hazelcast.config.EurekaConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) PersistentMemoryDirectoryConfig(com.hazelcast.config.PersistentMemoryDirectoryConfig) TcpIpConfig(com.hazelcast.config.TcpIpConfig) Assert.assertNull(org.junit.Assert.assertNull) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) WanReplicationConfig(com.hazelcast.config.WanReplicationConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) ContextConfiguration(org.springframework.test.context.ContextConfiguration) CompactSerializationConfig(com.hazelcast.config.CompactSerializationConfig) FlakeIdGenerator(com.hazelcast.flakeidgen.FlakeIdGenerator) PARTIAL_RECOVERY_MOST_COMPLETE(com.hazelcast.config.PersistenceClusterDataRecoveryPolicy.PARTIAL_RECOVERY_MOST_COMPLETE) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) Assert.assertEquals(org.junit.Assert.assertEquals) GlobalSerializerConfig(com.hazelcast.config.GlobalSerializerConfig) GcpConfig(com.hazelcast.config.GcpConfig) DummyPortableFactory(com.hazelcast.spring.serialization.DummyPortableFactory) Member(com.hazelcast.cluster.Member) QuickTest(com.hazelcast.test.annotation.QuickTest) ISemaphore(com.hazelcast.cp.ISemaphore) EventJournalConfig(com.hazelcast.config.EventJournalConfig) MaxSizePolicy(com.hazelcast.config.MaxSizePolicy) TopicOverloadPolicy(com.hazelcast.topic.TopicOverloadPolicy) IAtomicLong(com.hazelcast.cp.IAtomicLong) MembershipListener(com.hazelcast.cluster.MembershipListener) DummyDataSerializableFactory(com.hazelcast.spring.serialization.DummyDataSerializableFactory) PermissionType(com.hazelcast.config.PermissionConfig.PermissionType) StreamSerializer(com.hazelcast.nio.serialization.StreamSerializer) MultiMapConfig(com.hazelcast.config.MultiMapConfig) QueueStoreFactory(com.hazelcast.collection.QueueStoreFactory) WanReplicationRef(com.hazelcast.config.WanReplicationRef) RestEndpointGroup(com.hazelcast.config.RestEndpointGroup) Assert.fail(org.junit.Assert.fail) IQueue(com.hazelcast.collection.IQueue) ExecutorConfig(com.hazelcast.config.ExecutorConfig) SocketInterceptorConfig(com.hazelcast.config.SocketInterceptorConfig) CollectionUtil.isNotEmpty(com.hazelcast.internal.util.CollectionUtil.isNotEmpty) ManagementCenterConfig(com.hazelcast.config.ManagementCenterConfig) MetadataPolicy(com.hazelcast.config.MetadataPolicy) NativeMemoryConfig(com.hazelcast.config.NativeMemoryConfig) IAtomicReference(com.hazelcast.cp.IAtomicReference) EvictionPolicy(com.hazelcast.config.EvictionPolicy) SimpleAuthenticationConfig(com.hazelcast.config.security.SimpleAuthenticationConfig) EncryptionAtRestConfig(com.hazelcast.config.EncryptionAtRestConfig) HazelcastTestSupport(com.hazelcast.test.HazelcastTestSupport) Collection(java.util.Collection) DiskTierConfig(com.hazelcast.config.DiskTierConfig) EntryListener(com.hazelcast.core.EntryListener) CRDTReplicationConfig(com.hazelcast.config.CRDTReplicationConfig) InetSocketAddress(java.net.InetSocketAddress) IndexConfig(com.hazelcast.config.IndexConfig) ClusterProperty(com.hazelcast.spi.properties.ClusterProperty) WanPublisher(com.hazelcast.wan.WanPublisher) List(java.util.List) WanQueueFullBehavior(com.hazelcast.config.WanQueueFullBehavior) VaultSecureStoreConfig(com.hazelcast.config.VaultSecureStoreConfig) QueueStoreConfig(com.hazelcast.config.QueueStoreConfig) ItemListenerConfig(com.hazelcast.config.ItemListenerConfig) RingbufferStore(com.hazelcast.ringbuffer.RingbufferStore) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) SplitBrainProtectionOn(com.hazelcast.splitbrainprotection.SplitBrainProtectionOn) SetConfig(com.hazelcast.config.SetConfig) BeforeClass(org.junit.BeforeClass) QueueConfig(com.hazelcast.config.QueueConfig) FencedLock(com.hazelcast.cp.lock.FencedLock) HazelcastInstanceFactory(com.hazelcast.instance.impl.HazelcastInstanceFactory) SSLConfig(com.hazelcast.config.SSLConfig) WanPublisherState(com.hazelcast.wan.WanPublisherState) HashMap(java.util.HashMap) ListenerConfig(com.hazelcast.config.ListenerConfig) HashSet(java.util.HashSet) MERGE_NEXT_RUN_DELAY_SECONDS(com.hazelcast.spi.properties.ClusterProperty.MERGE_NEXT_RUN_DELAY_SECONDS) WanBatchPublisherConfig(com.hazelcast.config.WanBatchPublisherConfig) MultiMap(com.hazelcast.multimap.MultiMap) IndexType(com.hazelcast.config.IndexType) RingbufferConfig(com.hazelcast.config.RingbufferConfig) QueryCacheConfig(com.hazelcast.config.QueryCacheConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) PortableFactory(com.hazelcast.nio.serialization.PortableFactory) DummyCompactSerializer(com.hazelcast.spring.serialization.DummyCompactSerializer) ExecutorService(java.util.concurrent.ExecutorService) IList(com.hazelcast.collection.IList) SplitBrainProtectionConfig(com.hazelcast.config.SplitBrainProtectionConfig) Config(com.hazelcast.config.Config) MemberAttributeConfig(com.hazelcast.config.MemberAttributeConfig) MemorySize(com.hazelcast.memory.MemorySize) PNCounter(com.hazelcast.crdt.pncounter.PNCounter) DummyCompactSerializable(com.hazelcast.spring.serialization.DummyCompactSerializable) Iterator(java.util.Iterator) USED_NATIVE_MEMORY_PERCENTAGE(com.hazelcast.config.MaxSizePolicy.USED_NATIVE_MEMORY_PERCENTAGE) SocketInterceptor(com.hazelcast.nio.SocketInterceptor) Assert.assertNotNull(org.junit.Assert.assertNotNull) ClassFilter(com.hazelcast.config.ClassFilter) FencedLockConfig(com.hazelcast.config.cp.FencedLockConfig) SecurityConfig(com.hazelcast.config.SecurityConfig) AuditlogConfig(com.hazelcast.config.AuditlogConfig) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) CacheDeserializedValues(com.hazelcast.config.CacheDeserializedValues) AzureConfig(com.hazelcast.config.AzureConfig) MemoryTierConfig(com.hazelcast.config.MemoryTierConfig) Collections(java.util.Collections) ProbabilisticSplitBrainProtectionFunction(com.hazelcast.splitbrainprotection.impl.ProbabilisticSplitBrainProtectionFunction) IMap(com.hazelcast.map.IMap) MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) WanReplicationRef(com.hazelcast.config.WanReplicationRef) NearCacheConfig(com.hazelcast.config.NearCacheConfig) MemoryTierConfig(com.hazelcast.config.MemoryTierConfig) MapStoreConfig(com.hazelcast.config.MapStoreConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) EventJournalConfig(com.hazelcast.config.EventJournalConfig) IndexConfig(com.hazelcast.config.IndexConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) DiskTierConfig(com.hazelcast.config.DiskTierConfig) MapConfig(com.hazelcast.config.MapConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) AttributeConfig(com.hazelcast.config.AttributeConfig) MemberAttributeConfig(com.hazelcast.config.MemberAttributeConfig) Test(org.junit.Test) QuickTest(com.hazelcast.test.annotation.QuickTest)

Example 2 with DiskTierConfig

use of com.hazelcast.config.DiskTierConfig in project hazelcast by hazelcast.

the class ConfigDataSerializerHook method createFactory.

@Override
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[WAN_REPLICATION_CONFIG] = arg -> new WanReplicationConfig();
    constructors[WAN_CONSUMER_CONFIG] = arg -> new WanConsumerConfig();
    constructors[WAN_CUSTOM_PUBLISHER_CONFIG] = arg -> new WanCustomPublisherConfig();
    constructors[WAN_BATCH_PUBLISHER_CONFIG] = arg -> new WanBatchPublisherConfig();
    constructors[NEAR_CACHE_CONFIG] = arg -> new NearCacheConfig();
    constructors[NEAR_CACHE_PRELOADER_CONFIG] = arg -> new NearCachePreloaderConfig();
    constructors[ADD_DYNAMIC_CONFIG_OP] = arg -> new AddDynamicConfigOperation();
    constructors[DYNAMIC_CONFIG_PRE_JOIN_OP] = arg -> new DynamicConfigPreJoinOperation();
    constructors[MULTIMAP_CONFIG] = arg -> new MultiMapConfig();
    constructors[LISTENER_CONFIG] = arg -> new ListenerConfig();
    constructors[ENTRY_LISTENER_CONFIG] = arg -> new EntryListenerConfig();
    constructors[MAP_CONFIG] = arg -> new MapConfig();
    constructors[MAP_STORE_CONFIG] = arg -> new MapStoreConfig();
    constructors[MAP_PARTITION_LOST_LISTENER_CONFIG] = arg -> new MapPartitionLostListenerConfig();
    constructors[INDEX_CONFIG] = arg -> new IndexConfig();
    constructors[MAP_ATTRIBUTE_CONFIG] = arg -> new AttributeConfig();
    constructors[QUERY_CACHE_CONFIG] = arg -> new QueryCacheConfig();
    constructors[PREDICATE_CONFIG] = arg -> new PredicateConfig();
    constructors[PARTITION_STRATEGY_CONFIG] = arg -> new PartitioningStrategyConfig();
    constructors[HOT_RESTART_CONFIG] = arg -> new HotRestartConfig();
    constructors[TOPIC_CONFIG] = arg -> new TopicConfig();
    constructors[RELIABLE_TOPIC_CONFIG] = arg -> new ReliableTopicConfig();
    constructors[ITEM_LISTENER_CONFIG] = arg -> new ItemListenerConfig();
    constructors[QUEUE_STORE_CONFIG] = arg -> new QueueStoreConfig();
    constructors[QUEUE_CONFIG] = arg -> new QueueConfig();
    constructors[LIST_CONFIG] = arg -> new ListConfig();
    constructors[SET_CONFIG] = arg -> new SetConfig();
    constructors[EXECUTOR_CONFIG] = arg -> new ExecutorConfig();
    constructors[DURABLE_EXECUTOR_CONFIG] = arg -> new DurableExecutorConfig();
    constructors[SCHEDULED_EXECUTOR_CONFIG] = arg -> new ScheduledExecutorConfig();
    constructors[REPLICATED_MAP_CONFIG] = arg -> new ReplicatedMapConfig();
    constructors[RINGBUFFER_CONFIG] = arg -> new RingbufferConfig();
    constructors[RINGBUFFER_STORE_CONFIG] = arg -> new RingbufferStoreConfig();
    constructors[CARDINALITY_ESTIMATOR_CONFIG] = arg -> new CardinalityEstimatorConfig();
    constructors[SIMPLE_CACHE_CONFIG] = arg -> new CacheSimpleConfig();
    constructors[SIMPLE_CACHE_CONFIG_EXPIRY_POLICY_FACTORY_CONFIG] = arg -> new CacheSimpleConfig.ExpiryPolicyFactoryConfig();
    constructors[SIMPLE_CACHE_CONFIG_TIMED_EXPIRY_POLICY_FACTORY_CONFIG] = arg -> new CacheSimpleConfig.ExpiryPolicyFactoryConfig.TimedExpiryPolicyFactoryConfig();
    constructors[SIMPLE_CACHE_CONFIG_DURATION_CONFIG] = arg -> new CacheSimpleConfig.ExpiryPolicyFactoryConfig.DurationConfig();
    constructors[SPLIT_BRAIN_PROTECTION_CONFIG] = arg -> new SplitBrainProtectionConfig();
    constructors[EVENT_JOURNAL_CONFIG] = arg -> new EventJournalConfig();
    constructors[SPLIT_BRAIN_PROTECTION_LISTENER_CONFIG] = arg -> new SplitBrainProtectionListenerConfig();
    constructors[CACHE_PARTITION_LOST_LISTENER_CONFIG] = arg -> new CachePartitionLostListenerConfig();
    constructors[SIMPLE_CACHE_ENTRY_LISTENER_CONFIG] = arg -> new CacheSimpleEntryListenerConfig();
    constructors[FLAKE_ID_GENERATOR_CONFIG] = arg -> new FlakeIdGeneratorConfig();
    constructors[MERGE_POLICY_CONFIG] = arg -> new MergePolicyConfig();
    constructors[PN_COUNTER_CONFIG] = arg -> new PNCounterConfig();
    constructors[MERKLE_TREE_CONFIG] = arg -> new MerkleTreeConfig();
    constructors[WAN_SYNC_CONFIG] = arg -> new WanSyncConfig();
    constructors[KUBERNETES_CONFIG] = arg -> new KubernetesConfig();
    constructors[EUREKA_CONFIG] = arg -> new EurekaConfig();
    constructors[GCP_CONFIG] = arg -> new GcpConfig();
    constructors[AZURE_CONFIG] = arg -> new AzureConfig();
    constructors[AWS_CONFIG] = arg -> new AwsConfig();
    constructors[DISCOVERY_CONFIG] = arg -> new DiscoveryConfig();
    constructors[DISCOVERY_STRATEGY_CONFIG] = arg -> new DiscoveryStrategyConfig();
    constructors[WAN_REPLICATION_REF] = arg -> new WanReplicationRef();
    constructors[EVICTION_CONFIG] = arg -> new EvictionConfig();
    constructors[PERMISSION_CONFIG] = arg -> new PermissionConfig();
    constructors[BITMAP_INDEX_OPTIONS] = arg -> new BitmapIndexOptions();
    constructors[DATA_PERSISTENCE_CONFIG] = arg -> new DataPersistenceConfig();
    constructors[TIERED_STORE_CONFIG] = arg -> new TieredStoreConfig();
    constructors[MEMORY_TIER_CONFIG] = arg -> new MemoryTierConfig();
    constructors[DISK_TIER_CONFIG] = arg -> new DiskTierConfig();
    return new ArrayDataSerializableFactory(constructors);
}
Also used : PermissionConfig(com.hazelcast.config.PermissionConfig) AzureConfig(com.hazelcast.config.AzureConfig) AddDynamicConfigOperation(com.hazelcast.internal.dynamicconfig.AddDynamicConfigOperation) PNCounterConfig(com.hazelcast.config.PNCounterConfig) ExecutorConfig(com.hazelcast.config.ExecutorConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) WanBatchPublisherConfig(com.hazelcast.config.WanBatchPublisherConfig) QueueStoreConfig(com.hazelcast.config.QueueStoreConfig) WanSyncConfig(com.hazelcast.config.WanSyncConfig) DataPersistenceConfig(com.hazelcast.config.DataPersistenceConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) WanCustomPublisherConfig(com.hazelcast.config.WanCustomPublisherConfig) EurekaConfig(com.hazelcast.config.EurekaConfig) WanReplicationConfig(com.hazelcast.config.WanReplicationConfig) KubernetesConfig(com.hazelcast.config.KubernetesConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) PredicateConfig(com.hazelcast.config.PredicateConfig) NearCachePreloaderConfig(com.hazelcast.config.NearCachePreloaderConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) RingbufferStoreConfig(com.hazelcast.config.RingbufferStoreConfig) GcpConfig(com.hazelcast.config.GcpConfig) AttributeConfig(com.hazelcast.config.AttributeConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) QueueConfig(com.hazelcast.config.QueueConfig) QueryCacheConfig(com.hazelcast.config.QueryCacheConfig) DiscoveryStrategyConfig(com.hazelcast.config.DiscoveryStrategyConfig) DynamicConfigPreJoinOperation(com.hazelcast.internal.dynamicconfig.DynamicConfigPreJoinOperation) NearCacheConfig(com.hazelcast.config.NearCacheConfig) BitmapIndexOptions(com.hazelcast.config.BitmapIndexOptions) MemoryTierConfig(com.hazelcast.config.MemoryTierConfig) MapStoreConfig(com.hazelcast.config.MapStoreConfig) SplitBrainProtectionConfig(com.hazelcast.config.SplitBrainProtectionConfig) MerkleTreeConfig(com.hazelcast.config.MerkleTreeConfig) SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) ItemListenerConfig(com.hazelcast.config.ItemListenerConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) ListenerConfig(com.hazelcast.config.ListenerConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) WanConsumerConfig(com.hazelcast.config.WanConsumerConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) DiskTierConfig(com.hazelcast.config.DiskTierConfig) ItemListenerConfig(com.hazelcast.config.ItemListenerConfig) SetConfig(com.hazelcast.config.SetConfig) MapConfig(com.hazelcast.config.MapConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ListConfig(com.hazelcast.config.ListConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) HotRestartConfig(com.hazelcast.config.HotRestartConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) AwsConfig(com.hazelcast.config.AwsConfig) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) WanReplicationRef(com.hazelcast.config.WanReplicationRef) EvictionConfig(com.hazelcast.config.EvictionConfig) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig) EventJournalConfig(com.hazelcast.config.EventJournalConfig) ConstructorFunction(com.hazelcast.internal.util.ConstructorFunction) PartitioningStrategyConfig(com.hazelcast.config.PartitioningStrategyConfig) IndexConfig(com.hazelcast.config.IndexConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) DiscoveryConfig(com.hazelcast.config.DiscoveryConfig) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory)

Example 3 with DiskTierConfig

use of com.hazelcast.config.DiskTierConfig in project hazelcast by hazelcast.

the class MemberDomConfigProcessor method createDiskTierConfig.

private DiskTierConfig createDiskTierConfig(Node node) {
    DiskTierConfig diskTierConfig = new DiskTierConfig();
    Node attrEnabled = getNamedItemNode(node, "enabled");
    boolean enabled = getBooleanValue(getTextContent(attrEnabled));
    diskTierConfig.setEnabled(enabled);
    Node attrDeviceName = getNamedItemNode(node, "device-name");
    if (attrDeviceName != null) {
        diskTierConfig.setDeviceName(getTextContent(attrDeviceName));
    }
    return diskTierConfig;
}
Also used : DiskTierConfig(com.hazelcast.config.DiskTierConfig) Node(org.w3c.dom.Node)

Example 4 with DiskTierConfig

use of com.hazelcast.config.DiskTierConfig in project hazelcast by hazelcast.

the class AbstractDynamicConfigGeneratorTest method tieredStoreConfig.

private static TieredStoreConfig tieredStoreConfig() {
    MemoryTierConfig memTierConfig = new MemoryTierConfig().setCapacity(Capacity.of(13401L, MemoryUnit.MEGABYTES));
    DiskTierConfig diskTierConfig = new DiskTierConfig().setEnabled(true).setDeviceName("device04");
    return new TieredStoreConfig().setEnabled(true).setMemoryTierConfig(memTierConfig).setDiskTierConfig(diskTierConfig);
}
Also used : DiskTierConfig(com.hazelcast.config.DiskTierConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) MemoryTierConfig(com.hazelcast.config.MemoryTierConfig)

Aggregations

DiskTierConfig (com.hazelcast.config.DiskTierConfig)4 MemoryTierConfig (com.hazelcast.config.MemoryTierConfig)3 TieredStoreConfig (com.hazelcast.config.TieredStoreConfig)3 AttributeConfig (com.hazelcast.config.AttributeConfig)2 AwsConfig (com.hazelcast.config.AwsConfig)2 AzureConfig (com.hazelcast.config.AzureConfig)2 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)2 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)2 DiscoveryConfig (com.hazelcast.config.DiscoveryConfig)2 DiscoveryStrategyConfig (com.hazelcast.config.DiscoveryStrategyConfig)2 DurableExecutorConfig (com.hazelcast.config.DurableExecutorConfig)2 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)2 EurekaConfig (com.hazelcast.config.EurekaConfig)2 EventJournalConfig (com.hazelcast.config.EventJournalConfig)2 EvictionConfig (com.hazelcast.config.EvictionConfig)2 ExecutorConfig (com.hazelcast.config.ExecutorConfig)2 FlakeIdGeneratorConfig (com.hazelcast.config.FlakeIdGeneratorConfig)2 GcpConfig (com.hazelcast.config.GcpConfig)2 IndexConfig (com.hazelcast.config.IndexConfig)2 ItemListenerConfig (com.hazelcast.config.ItemListenerConfig)2