All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.hazelcast-client.3.11.2.source-code.hazelcast-client-full.xml Maven / Gradle / Ivy

There is a newer version: 3.12.13
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!--
  This is a full example hazelcast-client.xml that includes all the
  configuration elements and attributes of a Hazelcast client.

  To use this, rename it to hazelcast-client.xml and place it in
  the directory where you start your Hazelcast client.

  To learn how to configure Hazelcast, please see the schema at
  https://hazelcast.com/schema/client-config/hazelcast-client-config-3.11.xsd
  or the Reference Manual at https://hazelcast.org/documentation/
-->

<!--suppress XmlDefaultAttributeValue -->
<hazelcast-client xmlns="http://www.hazelcast.com/schema/client-config"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://www.hazelcast.com/schema/client-config
                  http://www.hazelcast.com/schema/client-config/hazelcast-client-config-3.11.xsd">

    <config-replacers fail-if-value-missing="false">
        <replacer class-name="com.hazelcast.config.replacer.EncryptionReplacer">
            <properties>
                <property name="passwordFile">password.txt</property>
                <property name="passwordUserProperties">false</property>
                <property name="cipherAlgorithm">DES</property>
                <property name="keyLengthBits">64</property>
                <property name="secretKeyAlgorithm">DES</property>
                <property name="secretKeyFactoryAlgorithm">PBKDF2WithHmacSHA1</property>
            </properties>
        </replacer>
    </config-replacers>

    <group>
        <name>dev</name>
        <password>dev-pass</password>
    </group>
    <license-key>HAZELCAST_ENTERPRISE_LICENSE_KEY</license-key>
    <properties>
        <property name="hazelcast.client.shuffle.member.list">true</property>
        <property name="hazelcast.client.heartbeat.timeout">60000</property>
        <property name="hazelcast.client.heartbeat.interval">5000</property>
        <property name="hazelcast.client.event.thread.count">5</property>
        <property name="hazelcast.client.event.queue.capacity">1000000</property>
        <property name="hazelcast.client.invocation.timeout.seconds">120</property>
    </properties>

    <network>
        <cluster-members>
            <address>127.0.0.1</address>
            <address>127.0.0.2</address>
        </cluster-members>
        <outbound-ports>
            <ports>34600</ports>
            <ports>34700-34710</ports>
        </outbound-ports>
        <smart-routing>true</smart-routing>
        <redo-operation>true</redo-operation>
        <connection-timeout>60000</connection-timeout>
        <connection-attempt-period>3000</connection-attempt-period>
        <connection-attempt-limit>2</connection-attempt-limit>
        <socket-options>
            <tcp-no-delay>false</tcp-no-delay>
            <keep-alive>true</keep-alive>
            <reuse-address>true</reuse-address>
            <linger-seconds>3</linger-seconds>
            <timeout>-1</timeout>
            <buffer-size>128</buffer-size>
        </socket-options>
        <socket-interceptor enabled="true">
            <class-name>com.hazelcast.examples.MySocketInterceptor</class-name>
            <properties>
                <property name="foo">bar</property>
            </properties>
        </socket-interceptor>

        <ssl enabled="false">
            <factory-class-name>com.hazelcast.nio.ssl.BasicSSLContextFactory</factory-class-name>
            <properties>
                <property name="protocol">TLS</property>

                <property name="trustStore">/opt/hazelcast-client.truststore</property>
                <property name="trustStorePassword">secret.123456</property>
                <property name="trustStoreType">JKS</property>

                <!-- Following properties are only needed when the mutual authentication is used. -->
                <property name="keyStore">/opt/hazelcast-client.keystore</property>
                <property name="keyStorePassword">keystorePassword123</property>
                <property name="keyStoreType">JKS</property>
            </properties>
        </ssl>
        <aws enabled="true" connection-timeout-seconds="11">
            <inside-aws>true</inside-aws>
            <access-key>TEST_ACCESS_KEY</access-key>
            <secret-key>TEST_SECRET_KEY</secret-key>
            <region>us-east-1</region>
            <host-header>ec2.amazonaws.com</host-header>
            <security-group-name>hazelcast-sg</security-group-name>
            <tag-key>type</tag-key>
            <tag-value>hz-nodes</tag-value>
        </aws>
        <gcp enabled="false">
            <zones>us-east1-b,us-east1-c</zones>
        </gcp>
        <azure enabled="false">
            <client-id>CLIENT_ID</client-id>
            <client-secret>CLIENT_SECRET</client-secret>
            <tenant-id>TENANT_ID</tenant-id>
            <subscription-id>SUB_ID</subscription-id>
            <cluster-id>HZLCAST001</cluster-id>
            <group-name>GROUP-NAME</group-name>
        </azure>
        <kubernetes enabled="false">
            <namespace>MY-KUBERNETES-NAMESPACE</namespace>
            <service-name>MY-SERVICE-NAME</service-name>
            <service-label-name>MY-SERVICE-LABEL-NAME</service-label-name>
            <service-label-value>MY-SERVICE-LABEL-VALUE</service-label-value>
        </kubernetes>
        <eureka enabled="false">
            <self-registration>true</self-registration>
            <namespace>hazelcast</namespace>
        </eureka>
        <icmp-ping enabled="false">
            <timeout-milliseconds>2000</timeout-milliseconds>
            <interval-milliseconds>3000</interval-milliseconds>
            <ttl>100</ttl>
            <max-attempts>5</max-attempts>
            <echo-fail-fast-on-startup>false</echo-fail-fast-on-startup>
        </icmp-ping>
        <hazelcast-cloud enabled="false">
            <discovery-token>EXAMPLE_TOKEN</discovery-token>
        </hazelcast-cloud>
    </network>

    <executor-pool-size>40</executor-pool-size>


    <security>
        <credentials>com.hazelcast.security.UsernamePasswordCredentials</credentials>
        <credentials-factory class-name="com.hazelcast.examples.MyCredentialsFactory">
            <properties>
                <property name="property">value</property>
            </properties>
        </credentials-factory>
    </security>

    <listeners>
        <listener>com.hazelcast.examples.MembershipListener</listener>
        <listener>com.hazelcast.examples.InstanceListener</listener>
        <listener>com.hazelcast.examples.MigrationListener</listener>
    </listeners>

    <serialization>
        <portable-version>3</portable-version>
        <use-native-byte-order>true</use-native-byte-order>
        <byte-order>BIG_ENDIAN</byte-order>
        <enable-compression>false</enable-compression>
        <enable-shared-object>true</enable-shared-object>
        <allow-unsafe>false</allow-unsafe>
        <data-serializable-factories>
            <data-serializable-factory factory-id="1">com.hazelcast.examples.DataSerializableFactory
            </data-serializable-factory>
        </data-serializable-factories>
        <portable-factories>
            <portable-factory factory-id="2">com.hazelcast.examples.PortableFactory</portable-factory>
        </portable-factories>
        <serializers>
            <global-serializer override-java-serialization="true">com.hazelcast.examples.GlobalSerializerFactory
            </global-serializer>
            <serializer type-class="com.hazelcast.examples.DummyType"
                        class-name="com.hazelcast.examples.SerializerFactory"/>
        </serializers>
        <check-class-def-errors>true</check-class-def-errors>
        <java-serialization-filter>
            <blacklist>
                <class>com.acme.app.BeanComparator</class>
            </blacklist>
            <whitelist>
                <class>java.lang.String</class>
                <class>example.Foo</class>
                <package>com.acme.app</package>
                <package>com.acme.app.subpkg</package>
            </whitelist>
        </java-serialization-filter>
    </serialization>

    <native-memory enabled="false" allocator-type="POOLED">
        <size unit="MEGABYTES" value="128"/>
        <min-block-size>1</min-block-size>
        <page-size>1</page-size>
        <metadata-space-percentage>40.5</metadata-space-percentage>
    </native-memory>

    <proxy-factories>
        <proxy-factory class-name="com.hazelcast.examples.ProxyXYZ1" service="sampleService1"/>
        <proxy-factory class-name="com.hazelcast.examples.ProxyXYZ2" service="sampleService1"/>
        <proxy-factory class-name="com.hazelcast.examples.ProxyXYZ3" service="sampleService3"/>
    </proxy-factories>

    <load-balancer type="random"/>

    <!--
        Note that the Near Cache eviction configuration is different for NATIVE in-memory format.
        Proper eviction configuration example for NATIVE in-memory format :
           `<eviction max-size-policy="USED_NATIVE_MEMORY_SIZE" eviction-policy="LFU" size="60"/>`
    -->
    <near-cache name="default">
        <max-size>2000</max-size>
        <time-to-live-seconds>90</time-to-live-seconds>
        <max-idle-seconds>100</max-idle-seconds>
        <eviction-policy>LFU</eviction-policy>
        <invalidate-on-change>true</invalidate-on-change>
        <in-memory-format>OBJECT</in-memory-format>
        <serialize-keys>true</serialize-keys>
        <local-update-policy>INVALIDATE</local-update-policy>
    </near-cache>

    <flake-id-generator name="default">
        <prefetch-count>100</prefetch-count>
        <prefetch-validity-millis>600000</prefetch-validity-millis>
    </flake-id-generator>

    <query-caches>
        <query-cache name="query-cache-name" mapName="map-name">
            <predicate type="class-name">com.hazelcast.examples.ExamplePredicate</predicate>
            <entry-listeners>
                <entry-listener include-value="true" local="false">com.hazelcast.examples.EntryListener</entry-listener>
            </entry-listeners>
            <include-value>true</include-value>
            <batch-size>1</batch-size>
            <buffer-size>16</buffer-size>
            <delay-seconds>0</delay-seconds>
            <in-memory-format>BINARY</in-memory-format>
            <coalesce>false</coalesce>
            <populate>true</populate>
            <eviction eviction-policy="LRU" max-size-policy="ENTRY_COUNT" size="10000"/>
            <indexes>
                <index ordered="false">name</index>
            </indexes>
        </query-cache>
    </query-caches>

    <connection-strategy async-start="true" reconnect-mode="ASYNC">
        <connection-retry enabled="true">
            <initial-backoff-millis>2000</initial-backoff-millis>
            <max-backoff-millis>60000</max-backoff-millis>
            <multiplier>3</multiplier>
            <fail-on-max-backoff>true</fail-on-max-backoff>
            <jitter>0.5</jitter>
        </connection-retry>
    </connection-strategy>

    <reliable-topic name="rel-topic">
        <read-batch-size>100</read-batch-size>
        <topic-overload-policy>DISCARD_NEWEST</topic-overload-policy>
    </reliable-topic>

    <user-code-deployment enabled="true">
        <jarPaths>
            <jarPath>/User/test/sample.jar</jarPath>
            <jarPath>https://hazelcast.com/</jarPath>
            <jarPath>file://User/test/sample.jar</jarPath>
        </jarPaths>
        <classNames>
            <className>test.sampleClassName</className>
        </classNames>
    </user-code-deployment>

</hazelcast-client>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy