Search in sources :

Example 16 with TopicConfig

use of com.hazelcast.config.TopicConfig 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 17 with TopicConfig

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

the class MemberDomConfigProcessor method handleReliableTopicNode.

void handleReliableTopicNode(Node node, final ReliableTopicConfig topicConfig) {
    for (Node n : childElements(node)) {
        String nodeName = cleanNodeName(n);
        if (matches("read-batch-size", nodeName)) {
            String batchSize = getTextContent(n);
            topicConfig.setReadBatchSize(getIntegerValue("read-batch-size", batchSize));
        } else if (matches("statistics-enabled", nodeName)) {
            topicConfig.setStatisticsEnabled(getBooleanValue(getTextContent(n)));
        } else if (matches("topic-overload-policy", nodeName)) {
            TopicOverloadPolicy topicOverloadPolicy = TopicOverloadPolicy.valueOf(upperCaseInternal(getTextContent(n)));
            topicConfig.setTopicOverloadPolicy(topicOverloadPolicy);
        } else if (matches("message-listeners", nodeName)) {
            handleMessageListeners(n, listenerConfig -> {
                topicConfig.addMessageListenerConfig(listenerConfig);
                return null;
            });
        }
    }
    config.addReliableTopicConfig(topicConfig);
}
Also used : ConfigValidator.checkNearCacheEvictionConfig(com.hazelcast.internal.config.ConfigValidator.checkNearCacheEvictionConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) MapConfig(com.hazelcast.config.MapConfig) PredicateConfig(com.hazelcast.config.PredicateConfig) PN_COUNTER(com.hazelcast.internal.config.ConfigSections.PN_COUNTER) Map(java.util.Map) StringUtil.equalsIgnoreCase(com.hazelcast.internal.util.StringUtil.equalsIgnoreCase) DiscoveryStrategyConfig(com.hazelcast.config.DiscoveryStrategyConfig) LdapRoleMappingMode.getRoleMappingMode(com.hazelcast.config.security.LdapRoleMappingMode.getRoleMappingMode) REPLICATED_MAP(com.hazelcast.internal.config.ConfigSections.REPLICATED_MAP) HazelcastException(com.hazelcast.core.HazelcastException) AbstractClusterLoginConfig(com.hazelcast.config.security.AbstractClusterLoginConfig) StringUtil.upperCaseInternal(com.hazelcast.internal.util.StringUtil.upperCaseInternal) ServerSocketEndpointConfig(com.hazelcast.config.ServerSocketEndpointConfig) InstanceConfig(com.hazelcast.jet.config.InstanceConfig) MetricsConfig(com.hazelcast.config.MetricsConfig) RestServerEndpointConfig(com.hazelcast.config.RestServerEndpointConfig) SplitBrainProtectionConfigBuilder(com.hazelcast.config.SplitBrainProtectionConfigBuilder) MapStoreConfig(com.hazelcast.config.MapStoreConfig) KerberosAuthenticationConfig(com.hazelcast.config.security.KerberosAuthenticationConfig) SCHEDULED_EXECUTOR_SERVICE(com.hazelcast.internal.config.ConfigSections.SCHEDULED_EXECUTOR_SERVICE) MemberGroupType(com.hazelcast.config.PartitionGroupConfig.MemberGroupType) MemberAddressProviderConfig(com.hazelcast.config.MemberAddressProviderConfig) CacheSimpleEntryListenerConfig(com.hazelcast.config.CacheSimpleEntryListenerConfig) WanConsumerConfig(com.hazelcast.config.WanConsumerConfig) EdgeConfig(com.hazelcast.jet.config.EdgeConfig) DomConfigHelper.firstChildElement(com.hazelcast.internal.config.DomConfigHelper.firstChildElement) RestApiConfig(com.hazelcast.config.RestApiConfig) SecureStoreConfig(com.hazelcast.config.SecureStoreConfig) ProtocolType(com.hazelcast.instance.ProtocolType) ConfigValidator.checkCacheEvictionConfig(com.hazelcast.internal.config.ConfigValidator.checkCacheEvictionConfig) OnJoinPermissionOperationName(com.hazelcast.config.OnJoinPermissionOperationName) WanCustomPublisherConfig(com.hazelcast.config.WanCustomPublisherConfig) JoinConfig(com.hazelcast.config.JoinConfig) INSTANCE_TRACKING(com.hazelcast.internal.config.ConfigSections.INSTANCE_TRACKING) EvictionConfig(com.hazelcast.config.EvictionConfig) TieredStoreConfig(com.hazelcast.config.TieredStoreConfig) HOT_RESTART_PERSISTENCE(com.hazelcast.internal.config.ConfigSections.HOT_RESTART_PERSISTENCE) TopicConfig(com.hazelcast.config.TopicConfig) ConsistencyCheckStrategy(com.hazelcast.config.ConsistencyCheckStrategy) SymmetricEncryptionConfig(com.hazelcast.config.SymmetricEncryptionConfig) AliasedDiscoveryConfigUtils.getConfigByTag(com.hazelcast.internal.config.AliasedDiscoveryConfigUtils.getConfigByTag) ADVANCED_NETWORK(com.hazelcast.internal.config.ConfigSections.ADVANCED_NETWORK) ConfigValidator.checkMapEvictionConfig(com.hazelcast.internal.config.ConfigValidator.checkMapEvictionConfig) Boolean.parseBoolean(java.lang.Boolean.parseBoolean) WanReplicationConfig(com.hazelcast.config.WanReplicationConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB(com.hazelcast.config.ServerSocketEndpointConfig.DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB) PERSISTENCE(com.hazelcast.internal.config.ConfigSections.PERSISTENCE) PermissionPolicyConfig(com.hazelcast.config.PermissionPolicyConfig) MaxSizePolicy(com.hazelcast.config.MaxSizePolicy) TokenIdentityConfig(com.hazelcast.config.security.TokenIdentityConfig) TopicOverloadPolicy(com.hazelcast.topic.TopicOverloadPolicy) DURABLE_EXECUTOR_SERVICE(com.hazelcast.internal.config.ConfigSections.DURABLE_EXECUTOR_SERVICE) LdapAuthenticationConfig(com.hazelcast.config.security.LdapAuthenticationConfig) UserCodeDeploymentConfig(com.hazelcast.config.UserCodeDeploymentConfig) JET(com.hazelcast.internal.config.ConfigSections.JET) EXECUTOR_SERVICE(com.hazelcast.internal.config.ConfigSections.EXECUTOR_SERVICE) DEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS(com.hazelcast.config.ServerSocketEndpointConfig.DEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS) RestEndpointGroup(com.hazelcast.config.RestEndpointGroup) DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB(com.hazelcast.config.ServerSocketEndpointConfig.DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB) Method(java.lang.reflect.Method) ExecutorConfig(com.hazelcast.config.ExecutorConfig) AutoDetectionConfig(com.hazelcast.config.AutoDetectionConfig) SimpleAuthenticationConfig(com.hazelcast.config.security.SimpleAuthenticationConfig) EncryptionAtRestConfig(com.hazelcast.config.EncryptionAtRestConfig) DiskTierConfig(com.hazelcast.config.DiskTierConfig) LITE_MEMBER(com.hazelcast.internal.config.ConfigSections.LITE_MEMBER) EndpointConfig(com.hazelcast.config.EndpointConfig) SplitBrainProtectionListenerConfig(com.hazelcast.config.SplitBrainProtectionListenerConfig) IndexConfig(com.hazelcast.config.IndexConfig) LOCAL_DEVICE(com.hazelcast.internal.config.ConfigSections.LOCAL_DEVICE) MANAGEMENT_CENTER(com.hazelcast.internal.config.ConfigSections.MANAGEMENT_CENTER) QueueStoreConfig(com.hazelcast.config.QueueStoreConfig) LdapSearchScope.getSearchScope(com.hazelcast.config.security.LdapSearchScope.getSearchScope) WanPublisherState(com.hazelcast.wan.WanPublisherState) SET(com.hazelcast.internal.config.ConfigSections.SET) Function(java.util.function.Function) CACHE(com.hazelcast.internal.config.ConfigSections.CACHE) HashSet(java.util.HashSet) WanBatchPublisherConfig(com.hazelcast.config.WanBatchPublisherConfig) LICENSE_KEY(com.hazelcast.internal.config.ConfigSections.LICENSE_KEY) Node(org.w3c.dom.Node) WAN_REPLICATION(com.hazelcast.internal.config.ConfigSections.WAN_REPLICATION) NamedNodeMap(org.w3c.dom.NamedNodeMap) LIST(com.hazelcast.internal.config.ConfigSections.LIST) SERIALIZATION(com.hazelcast.internal.config.ConfigSections.SERIALIZATION) QueryCacheConfig(com.hazelcast.config.QueryCacheConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) StringUtil(com.hazelcast.internal.util.StringUtil) HotRestartConfig(com.hazelcast.config.HotRestartConfig) FencedLockConfig(com.hazelcast.config.cp.FencedLockConfig) SecurityConfig(com.hazelcast.config.SecurityConfig) Integer.parseInt(java.lang.Integer.parseInt) RecentlyActiveSplitBrainProtectionConfigBuilder(com.hazelcast.config.RecentlyActiveSplitBrainProtectionConfigBuilder) Consumer(java.util.function.Consumer) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) Element(org.w3c.dom.Element) CacheDeserializedValues(com.hazelcast.config.CacheDeserializedValues) FLAKE_ID_GENERATOR(com.hazelcast.internal.config.ConfigSections.FLAKE_ID_GENERATOR) MemoryTierConfig(com.hazelcast.config.MemoryTierConfig) TrustedInterfacesConfigurable(com.hazelcast.config.TrustedInterfacesConfigurable) WanAcknowledgeType(com.hazelcast.config.WanAcknowledgeType) ListConfig(com.hazelcast.config.ListConfig) Arrays(java.util.Arrays) DomConfigHelper.cleanNodeName(com.hazelcast.internal.config.DomConfigHelper.cleanNodeName) PermissionConfig(com.hazelcast.config.PermissionConfig) TlsAuthenticationConfig(com.hazelcast.config.security.TlsAuthenticationConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) IMPORT(com.hazelcast.internal.config.ConfigSections.IMPORT) DynamicConfigurationConfig(com.hazelcast.config.DynamicConfigurationConfig) SerializationConfig(com.hazelcast.config.SerializationConfig) SemaphoreConfig(com.hazelcast.config.cp.SemaphoreConfig) RINGBUFFER(com.hazelcast.internal.config.ConfigSections.RINGBUFFER) ExpiryPolicyType(com.hazelcast.config.CacheSimpleConfig.ExpiryPolicyFactoryConfig.TimedExpiryPolicyFactoryConfig.ExpiryPolicyType) PersistenceConfig(com.hazelcast.config.PersistenceConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) RaftAlgorithmConfig(com.hazelcast.config.cp.RaftAlgorithmConfig) PARTITION_GROUP(com.hazelcast.internal.config.ConfigSections.PARTITION_GROUP) METRICS(com.hazelcast.internal.config.ConfigSections.METRICS) TokenEncoding(com.hazelcast.config.security.TokenEncoding) MulticastConfig(com.hazelcast.config.MulticastConfig) Logger(com.hazelcast.logging.Logger) KerberosIdentityConfig(com.hazelcast.config.security.KerberosIdentityConfig) ProbabilisticSplitBrainProtectionConfigBuilder(com.hazelcast.config.ProbabilisticSplitBrainProtectionConfigBuilder) Set(java.util.Set) MULTIMAP(com.hazelcast.internal.config.ConfigSections.MULTIMAP) HotRestartClusterDataRecoveryPolicy(com.hazelcast.config.HotRestartClusterDataRecoveryPolicy) NearCacheConfig(com.hazelcast.config.NearCacheConfig) StringUtil.isNullOrEmpty(com.hazelcast.internal.util.StringUtil.isNullOrEmpty) MemberGroupConfig(com.hazelcast.config.MemberGroupConfig) DomConfigHelper.childElementsWithName(com.hazelcast.internal.config.DomConfigHelper.childElementsWithName) DomConfigHelper.getIntegerValue(com.hazelcast.internal.config.DomConfigHelper.getIntegerValue) LocalDeviceConfig(com.hazelcast.config.LocalDeviceConfig) MergePolicyConfig(com.hazelcast.config.MergePolicyConfig) RealmConfig(com.hazelcast.config.security.RealmConfig) RingbufferStoreConfig(com.hazelcast.config.RingbufferStoreConfig) RELIABLE_TOPIC(com.hazelcast.internal.config.ConfigSections.RELIABLE_TOPIC) AttributeConfig(com.hazelcast.config.AttributeConfig) DomConfigHelper.getBooleanValue(com.hazelcast.internal.config.DomConfigHelper.getBooleanValue) PNCounterConfig(com.hazelcast.config.PNCounterConfig) InMemoryFormat(com.hazelcast.config.InMemoryFormat) WanSyncConfig(com.hazelcast.config.WanSyncConfig) IcmpFailureDetectorConfig(com.hazelcast.config.IcmpFailureDetectorConfig) MetricsManagementCenterConfig(com.hazelcast.config.MetricsManagementCenterConfig) DomConfigHelper.getDoubleValue(com.hazelcast.internal.config.DomConfigHelper.getDoubleValue) AliasedDiscoveryConfig(com.hazelcast.config.AliasedDiscoveryConfig) ArrayList(java.util.ArrayList) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) SqlConfig(com.hazelcast.config.SqlConfig) EntryListenerConfig(com.hazelcast.config.EntryListenerConfig) DEFAULT_SOCKET_LINGER_SECONDS(com.hazelcast.config.ServerSocketEndpointConfig.DEFAULT_SOCKET_LINGER_SECONDS) HotRestartPersistenceConfig(com.hazelcast.config.HotRestartPersistenceConfig) JetConfig(com.hazelcast.jet.config.JetConfig) SecurityInterceptorConfig(com.hazelcast.config.SecurityInterceptorConfig) DiscoveryConfig(com.hazelcast.config.DiscoveryConfig) USER_CODE_DEPLOYMENT(com.hazelcast.internal.config.ConfigSections.USER_CODE_DEPLOYMENT) File(java.io.File) PROPERTIES(com.hazelcast.internal.config.ConfigSections.PROPERTIES) NetworkConfig(com.hazelcast.config.NetworkConfig) TcpIpConfig(com.hazelcast.config.TcpIpConfig) MapPartitionLostListenerConfig(com.hazelcast.config.MapPartitionLostListenerConfig) CredentialsFactoryConfig(com.hazelcast.config.CredentialsFactoryConfig) Long.parseLong(java.lang.Long.parseLong) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) QUEUE(com.hazelcast.internal.config.ConfigSections.QUEUE) EventJournalConfig(com.hazelcast.config.EventJournalConfig) NETWORK(com.hazelcast.internal.config.ConfigSections.NETWORK) PermissionType(com.hazelcast.config.PermissionConfig.PermissionType) TOPIC(com.hazelcast.internal.config.ConfigSections.TOPIC) INSTANCE_NAME(com.hazelcast.internal.config.ConfigSections.INSTANCE_NAME) MultiMapConfig(com.hazelcast.config.MultiMapConfig) PartitioningStrategyConfig(com.hazelcast.config.PartitioningStrategyConfig) WanReplicationRef(com.hazelcast.config.WanReplicationRef) CARDINALITY_ESTIMATOR(com.hazelcast.internal.config.ConfigSections.CARDINALITY_ESTIMATOR) IndexUtils(com.hazelcast.query.impl.IndexUtils) SocketInterceptorConfig(com.hazelcast.config.SocketInterceptorConfig) DomConfigHelper.getLongValue(com.hazelcast.internal.config.DomConfigHelper.getLongValue) ManagementCenterConfig(com.hazelcast.config.ManagementCenterConfig) MetadataPolicy(com.hazelcast.config.MetadataPolicy) EvictionPolicy(com.hazelcast.config.EvictionPolicy) MEMBER_ATTRIBUTES(com.hazelcast.internal.config.ConfigSections.MEMBER_ATTRIBUTES) SQL(com.hazelcast.internal.config.ConfigSections.SQL) CRDTReplicationConfig(com.hazelcast.config.CRDTReplicationConfig) MetricsJmxConfig(com.hazelcast.config.MetricsJmxConfig) CLUSTER_NAME(com.hazelcast.internal.config.ConfigSections.CLUSTER_NAME) List(java.util.List) DYNAMIC_CONFIGURATION(com.hazelcast.internal.config.ConfigSections.DYNAMIC_CONFIGURATION) WanQueueFullBehavior(com.hazelcast.config.WanQueueFullBehavior) VaultSecureStoreConfig(com.hazelcast.config.VaultSecureStoreConfig) ItemListenerConfig(com.hazelcast.config.ItemListenerConfig) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) PersistenceClusterDataRecoveryPolicy(com.hazelcast.config.PersistenceClusterDataRecoveryPolicy) SplitBrainProtectionOn(com.hazelcast.splitbrainprotection.SplitBrainProtectionOn) SetConfig(com.hazelcast.config.SetConfig) LISTENERS(com.hazelcast.internal.config.ConfigSections.LISTENERS) QueueConfig(com.hazelcast.config.QueueConfig) SSLConfig(com.hazelcast.config.SSLConfig) HashMap(java.util.HashMap) AUDITLOG(com.hazelcast.internal.config.ConfigSections.AUDITLOG) ListenerConfig(com.hazelcast.config.ListenerConfig) NATIVE_MEMORY(com.hazelcast.internal.config.ConfigSections.NATIVE_MEMORY) DomConfigHelper.childElements(com.hazelcast.internal.config.DomConfigHelper.childElements) CRDT_REPLICATION(com.hazelcast.internal.config.ConfigSections.CRDT_REPLICATION) ILogger(com.hazelcast.logging.ILogger) MAP(com.hazelcast.internal.config.ConfigSections.MAP) RingbufferConfig(com.hazelcast.config.RingbufferConfig) ConfigValidator.checkCacheConfig(com.hazelcast.internal.config.ConfigValidator.checkCacheConfig) ConfigSections.canOccurMultipleTimes(com.hazelcast.internal.config.ConfigSections.canOccurMultipleTimes) InvalidConfigurationException(com.hazelcast.config.InvalidConfigurationException) SplitBrainProtectionConfig(com.hazelcast.config.SplitBrainProtectionConfig) Config(com.hazelcast.config.Config) JavaKeyStoreSecureStoreConfig(com.hazelcast.config.JavaKeyStoreSecureStoreConfig) EndpointQualifier(com.hazelcast.instance.EndpointQualifier) CachePartitionLostListenerConfig(com.hazelcast.config.CachePartitionLostListenerConfig) DataPersistenceConfig(com.hazelcast.config.DataPersistenceConfig) TimeUnit(java.util.concurrent.TimeUnit) SECURITY(com.hazelcast.internal.config.ConfigSections.SECURITY) INTEGRITY_CHECKER(com.hazelcast.internal.config.ConfigSections.INTEGRITY_CHECKER) SPLIT_BRAIN_PROTECTION(com.hazelcast.internal.config.ConfigSections.SPLIT_BRAIN_PROTECTION) InterfacesConfig(com.hazelcast.config.InterfacesConfig) CP_SUBSYSTEM(com.hazelcast.internal.config.ConfigSections.CP_SUBSYSTEM) StringUtil.lowerCaseInternal(com.hazelcast.internal.util.StringUtil.lowerCaseInternal) Node(org.w3c.dom.Node) TopicOverloadPolicy(com.hazelcast.topic.TopicOverloadPolicy)

Example 18 with TopicConfig

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

the class DynamicConfigXmlGenerator method topicXmlGenerator.

public static void topicXmlGenerator(ConfigXmlGenerator.XmlGenerator gen, Config config) {
    for (TopicConfig t : config.getTopicConfigs().values()) {
        gen.open("topic", "name", t.getName()).node("statistics-enabled", t.isStatisticsEnabled()).node("global-ordering-enabled", t.isGlobalOrderingEnabled());
        if (!t.getMessageListenerConfigs().isEmpty()) {
            gen.open("message-listeners");
            for (ListenerConfig lc : t.getMessageListenerConfigs()) {
                gen.node("message-listener", classNameOrImplClass(lc.getClassName(), lc.getImplementation()));
            }
            gen.close();
        }
        gen.node("multi-threading-enabled", t.isMultiThreadingEnabled());
        gen.close();
    }
}
Also used : 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) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig)

Example 19 with TopicConfig

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

the class ConfigSearchTest method testTopicConfig_Static.

@Test
public void testTopicConfig_Static() {
    TestCase<TopicConfig> testCase = new TestCase<TopicConfig>(new TopicConfig().setName(STATIC_NAME), new TopicConfig().setName(DYNAMIC_NAME), false) {

        @Override
        void addStaticConfig(Config config) {
            config.addTopicConfig(this.staticConfig);
        }

        @Override
        void addDynamicConfig(HazelcastInstance hazelcastInstance) {
            hazelcastInstance.getConfig().addTopicConfig(this.dynamicConfig);
        }

        @Override
        void asserts() {
            TopicConfig dataConfig = hazelcastInstance.getConfig().findTopicConfig(DYNAMIC_NAME);
            assertThat(dataConfig.getName(), equalTo(STATIC_NAME));
        }
    };
    testTemplate(testCase);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ListConfig(com.hazelcast.config.ListConfig) SetConfig(com.hazelcast.config.SetConfig) PNCounterConfig(com.hazelcast.config.PNCounterConfig) QueueConfig(com.hazelcast.config.QueueConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) MapConfig(com.hazelcast.config.MapConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) ExecutorConfig(com.hazelcast.config.ExecutorConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) TopicConfig(com.hazelcast.config.TopicConfig) Config(com.hazelcast.config.Config) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 20 with TopicConfig

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

the class ConfigSearchTest method testTopicConfig_Dynamic.

@Test
public void testTopicConfig_Dynamic() {
    TestCase<TopicConfig> testCase = new TestCase<TopicConfig>(new TopicConfig().setName(STATIC_NAME), new TopicConfig().setName(DYNAMIC_NAME), true) {

        @Override
        void addStaticConfig(Config config) {
            config.addTopicConfig(this.staticConfig);
        }

        @Override
        void addDynamicConfig(HazelcastInstance hazelcastInstance) {
            hazelcastInstance.getConfig().addTopicConfig(this.dynamicConfig);
        }

        @Override
        void asserts() {
            TopicConfig dataConfig = hazelcastInstance.getConfig().findTopicConfig(DYNAMIC_NAME);
            assertThat(dataConfig.getName(), equalTo(DYNAMIC_NAME));
        }
    };
    testTemplate(testCase);
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) ListConfig(com.hazelcast.config.ListConfig) SetConfig(com.hazelcast.config.SetConfig) PNCounterConfig(com.hazelcast.config.PNCounterConfig) QueueConfig(com.hazelcast.config.QueueConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) CacheSimpleConfig(com.hazelcast.config.CacheSimpleConfig) MapConfig(com.hazelcast.config.MapConfig) CardinalityEstimatorConfig(com.hazelcast.config.CardinalityEstimatorConfig) MultiMapConfig(com.hazelcast.config.MultiMapConfig) RingbufferConfig(com.hazelcast.config.RingbufferConfig) ExecutorConfig(com.hazelcast.config.ExecutorConfig) ScheduledExecutorConfig(com.hazelcast.config.ScheduledExecutorConfig) TopicConfig(com.hazelcast.config.TopicConfig) Config(com.hazelcast.config.Config) DurableExecutorConfig(com.hazelcast.config.DurableExecutorConfig) FlakeIdGeneratorConfig(com.hazelcast.config.FlakeIdGeneratorConfig) ReplicatedMapConfig(com.hazelcast.config.ReplicatedMapConfig) ReliableTopicConfig(com.hazelcast.config.ReliableTopicConfig) TopicConfig(com.hazelcast.config.TopicConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

TopicConfig (com.hazelcast.config.TopicConfig)23 ReliableTopicConfig (com.hazelcast.config.ReliableTopicConfig)16 ListenerConfig (com.hazelcast.config.ListenerConfig)9 Test (org.junit.Test)9 Config (com.hazelcast.config.Config)8 RingbufferConfig (com.hazelcast.config.RingbufferConfig)8 CacheSimpleConfig (com.hazelcast.config.CacheSimpleConfig)7 CardinalityEstimatorConfig (com.hazelcast.config.CardinalityEstimatorConfig)7 DurableExecutorConfig (com.hazelcast.config.DurableExecutorConfig)7 ExecutorConfig (com.hazelcast.config.ExecutorConfig)7 FlakeIdGeneratorConfig (com.hazelcast.config.FlakeIdGeneratorConfig)7 ListConfig (com.hazelcast.config.ListConfig)7 MapConfig (com.hazelcast.config.MapConfig)7 MultiMapConfig (com.hazelcast.config.MultiMapConfig)7 PNCounterConfig (com.hazelcast.config.PNCounterConfig)7 QueueConfig (com.hazelcast.config.QueueConfig)7 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)7 ScheduledExecutorConfig (com.hazelcast.config.ScheduledExecutorConfig)7 SetConfig (com.hazelcast.config.SetConfig)7 QuickTest (com.hazelcast.test.annotation.QuickTest)7