Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2008-2013, 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.
-->
<!--
A comprehensive example of Hazelcast configuration.
Hazelcast resolves configuration using the following approach:
1. First is checks to see if the ’hazelcast.config’ system property is set. If it is, then the value is used as the path.
The config option can be set by adding the following to the java command: - Dhazelcast.config=path_to_the_hazelcast.xml.
The value can be a normal file path, but can also be a classpath reference if it is prefixed with ’classpath:’.
2. Else it checks if there is a ’hazelcast.xml’ in the working directory.
3. After that it checks if there is a ’hazelcast.xml’ in the root of the classpath.
4. If a configuration cannot be found, Hazelcast will use the default hazelcast configuration
’hazelcast-default.xml’, which is included in the the Hazelcast jar
-->
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.3.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group>
<name>dev</name>
<password>dev-pass</password>
</group>
<license-key>HAZELCAST_ENTERPRISE_LICENSE_KEY</license-key>
<management-center enabled="true" update-interval="5">http://mywebserver:8080</management-center>
<wan-replication name="my-wan-cluster">
<target-cluster group-name="tokyo" group-password="tokyo-pass">
<replication-impl>com.hazelcast.wan.impl.WanNoDelayReplication</replication-impl>
<end-points>
<address>10.2.1.1:5701</address>
<address>10.2.1.2:5701</address>
</end-points>
</target-cluster>
<target-cluster group-name="london" group-password="london-pass">
<replication-impl>com.hazelcast.wan.impl.WanNoDelayReplication</replication-impl>
<end-points>
<address>10.3.5.1:5701</address>
<address>10.3.5.2:5701</address>
</end-points>
</target-cluster>
</wan-replication>
<network>
<port auto-increment="true" port-count="100">5701</port>
<outbound-ports>
<ports>33000-35000</ports>
<ports>37000,37001,37002,37003</ports>
<ports>38000,38500-38600</ports>
</outbound-ports>
<join>
<multicast enabled="true">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
<multicast-timeout-seconds>2</multicast-timeout-seconds>
<multicast-time-to-live>32</multicast-time-to-live>
<trusted-interfaces>
<interface>10.10.1.*</interface>
<interface>10.10.2.*</interface>
</trusted-interfaces>
</multicast>
<tcp-ip enabled="false">
<interface>127.0.0.1</interface>
</tcp-ip>
<aws enabled="false">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<!--optional, default is us-east-1 -->
<region>us-west-1</region>
<!--optional, default is ec2.amazonaws.com. If set, region shouldn't be set as it will override this property -->
<host-header>ec2.amazonaws.com</host-header>
<!-- optional, only instances belonging to this group will be discovered, default will try all running instances -->
<security-group-name>hazelcast-sg</security-group-name>
<tag-key>type</tag-key>
<tag-value>hz-nodes</tag-value>
</aws>
</join>
<interfaces enabled="false">
<interface>10.10.1.*</interface>
</interfaces>
<ssl enabled="false">
<factory-class-name>com.hazelcast.examples.MySSLContextFactory</factory-class-name>
<properties>
<property name="foo">bar</property>
</properties>
</ssl>
<socket-interceptor enabled="false">
<class-name>com.hazelcast.examples.MySocketInterceptor</class-name>
<properties>
<property name="foo">bar</property>
</properties>
</socket-interceptor>
<symmetric-encryption enabled="false">
<!--
encryption algorithm such as
DES/ECB/PKCS5Padding,
PBEWithMD5AndDES,
AES/CBC/PKCS5Padding,
Blowfish,
DESede
-->
<algorithm>PBEWithMD5AndDES</algorithm>
<!-- salt value to use when generating the secret key -->
<salt>thesalt</salt>
<!-- pass phrase to use when generating the secret key -->
<password>thepass</password>
<!-- iteration count to use when generating the secret key -->
<iteration-count>19</iteration-count>
</symmetric-encryption>
</network>
<partition-group enabled="false" group-type="CUSTOM">
<member-group>
<interface>10.10.0.*</interface>
<interface>10.10.3.*</interface>
<interface>10.10.5.*</interface>
</member-group>
<member-group>
<interface>10.10.10.10-100</interface>
<interface>10.10.1.*</interface>
<interface>10.10.2.*</interface>
</member-group>
</partition-group>
<executor-service name="default">
<pool-size>16</pool-size>
<queue-capacity>1000</queue-capacity>
</executor-service>
<queue name="default">
<!--
Maximum size of the queue. When a JVM's local queue size reaches the maximum,
all put/offer operations will get blocked until the queue size
of the JVM goes down below the maximum.
Any integer between 0 and Integer.MAX_VALUE. 0 means
Integer.MAX_VALUE. Default is 0.
-->
<max-size>0</max-size>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<item-listeners>
<item-listener include-value="true">com.hazelcast.examples.ItemListener</item-listener>
</item-listeners>
</queue>
<map name="default">
<!--
Data type that will be used for storing recordMap.
Possible values:
BINARY (default): keys and values will be stored as binary data
OBJECT : values will be stored in their object forms
OFFHEAP : values will be stored in non-heap region of JVM
-->
<in-memory-format>BINARY</in-memory-format>
<!--
Whether statistical information (hits, creation time, last access time etc.) should be gathered and stored.
You can disable if you do not plan to use eviction on your entries.
-->
<statistics-enabled>true</statistics-enabled>
<!--
Number of backups. If 1 is set as the backup-count for example,
then all entries of the map will be copied to another JVM for
fail-safety. 0 means no backup.
-->
<backup-count>1</backup-count>
<!--
Number of async backups. 0 means no backup.
-->
<async-backup-count>1</async-backup-count>
<!--
Maximum number of seconds for each item to live.
Any integer between 0 and Integer.MAX_VALUE. 0 means infinite. Default is 0.
-->
<time-to-live-seconds>0</time-to-live-seconds>
<!--
Maximum number of seconds for each item to stay idle (untouched).
Any integer between 0 and Integer.MAX_VALUE. 0 means infinite. Default is 0.
-->
<max-idle-seconds>0</max-idle-seconds>
<!--
Valid values are:
NONE (no eviction),
LRU (Least Recently Used),
LFU (Least Frequently Used).
NONE is the default.
-->
<eviction-policy>NONE</eviction-policy>
<!--
Maximum size of the map. When max size is reached,
map is evicted based on the policy defined.
Any integer between 0 and Integer.MAX_VALUE. 0 means
Integer.MAX_VALUE. Default is 0.
-->
<max-size policy="PER_NODE">0</max-size>
<!--
When max. size is reached, specified percentage of
the map will be evicted. Any integer between 0 and 100.
If 25 is set for example, 25% of the entries will
get evicted.
-->
<eviction-percentage>25</eviction-percentage>
<!--
While recovering from split-brain (network partitioning),
map entries in the small cluster will merge into the bigger cluster
based on the policy set here. When an entry merge into the
cluster, there might an existing entry with the same key already.
Values of these entries might be different for that same key.
Which value should be set for the key? Conflict is resolved by
the policy set here. Default policy is PutIfAbsentMapMergePolicy
There are built-in merge policies such as
com.hazelcast.map.merge.PassThroughMergePolicy; entry will be added if there is no existing entry for the key.
com.hazelcast.map.merge.PutIfAbsentMapMergePolicy ; entry will be added if the merging entry doesn't exist in the cluster.
com.hazelcast.map.merge.HigherHitsMapMergePolicy ; entry with the higher hits wins.
com.hazelcast.map.merge.LatestUpdateMapMergePolicy ; entry with the latest update wins.
-->
<merge-policy>com.hazelcast.map.merge.PassThroughMergePolicy</merge-policy>
<!--
Used to store Map entries in a backing store. If configured entries will be loaded from this store on startup.
On startup, may be loaded in two ways, controlled by the initial-mode attribute:
- LAZY. Asynchronously loads the entries. This is the default.
- EAGER. Synchronously loads the entries. Calls to getMap() are blocked while this happens.
-->
<map-store enabled="true" initial-mode="LAZY">
<class-name>com.hazelcast.examples.DummyStore</class-name>
<!-- <factory-class-name>com.hazelcast.examples.DummyStoreFactory</factory-class-name> -->
<write-delay-seconds>0</write-delay-seconds>
<properties>
<property name="dummy.property">value</property>
</properties>
</map-store>
<near-cache>
<max-size>10000</max-size>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LFU</eviction-policy>
<invalidate-on-change>true</invalidate-on-change>
<cache-local-entries>false</cache-local-entries>
</near-cache>
<wan-replication-ref name="my-wan-cluster">
<merge-policy>hz.PASS_THROUGH</merge-policy>
</wan-replication-ref>
<indexes>
<index ordered="false">name</index>
<index ordered="true">age</index>
</indexes>
<entry-listeners>
<entry-listener include-value="true" local="false">com.hazelcast.examples.EntryListener</entry-listener>
</entry-listeners>
</map>
<multimap name="default">
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<value-collection-type>SET</value-collection-type>
<entry-listeners>
<entry-listener include-value="true" local="true">com.hazelcast.examples.EntryListener</entry-listener>
</entry-listeners>
</multimap>
<list name="default">
<statistics-enabled>false</statistics-enabled>
<max-size>0</max-size>
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<item-listeners>
<item-listener include-value="true">com.hazelcast.examples.ItemListener</item-listener>
</item-listeners>
</list>
<set name="default">
<statistics-enabled>false</statistics-enabled>
<max-size>0</max-size>
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<item-listeners>
<item-listener include-value="true">com.hazelcast.examples.ItemListener</item-listener>
</item-listeners>
</set>
<topic name="default">
<message-listeners>
<message-listener>com.hazelcast.examples.MessageListener</message-listener>
</message-listeners>
</topic>
<semaphore name="default">
<initial-permits>10</initial-permits>
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
</semaphore>
<listeners>
<listener>com.hazelcast.examples.MembershipListener</listener>
<listener>com.hazelcast.examples.InstanceListener</listener>
<listener>com.hazelcast.examples.MigrationListener</listener>
</listeners>
<serialization>
<portable-version>0</portable-version>
<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="1">com.hazelcast.examples.PortableFactory</portable-factory>
</portable-factories>
<serializers>
<global-serializer>com.hazelcast.examples.GlobalSerializerFactory</global-serializer>
<serializer type-class="com.hazelcast.examples.DummyType">
com.hazelcast.examples.SerializerFactory</serializer>
</serializers>
<check-class-def-errors>true</check-class-def-errors>
</serialization>
<services enable-defaults="false">
<service enabled="true">
<name>custom-service</name>
<class-name>com.hazelcast.examples.MyService</class-name>
<properties>
<property name="prop1">prop1-value</property>
<property name="prop2">prop2-value</property>
</properties>
</service>
</services>
<security enabled="false">
<member-credentials-factory class-name="com.hazelcast.examples.MyCredentialsFactory">
<properties>
<property name="property">value</property>
</properties>
</member-credentials-factory>
<member-login-modules>
<login-module class-name="com.hazelcast.examples.MyRequiredLoginModule" usage="REQUIRED">
<properties>
<property name="property">value</property>
</properties>
</login-module>
</member-login-modules>
<client-login-modules>
<login-module class-name="com.hazelcast.examples.MyOptionalLoginModule" usage="OPTIONAL">
<properties>
<property name="property">value</property>
</properties>
</login-module>
<login-module class-name="com.hazelcast.examples.MyRequiredLoginModule" usage="REQUIRED">
<properties>
<property name="property">value</property>
</properties>
</login-module>
</client-login-modules>
<client-permission-policy class-name="com.hazelcast.examples.MyPermissionPolicy">
<properties>
<property name="property">value</property>
</properties>
</client-permission-policy>
<client-permissions>
<all-permissions principal="admin">
<endpoints>
<endpoint>127.0.0.1</endpoint>
</endpoints>
</all-permissions>
<map-permission name="default" principal="dev">
<actions>
<action>create</action>
<action>destroy</action>
<action>put</action>
<action>read</action>
</actions>
</map-permission>
<map-permission name="custom" principal="dev">
<endpoints>
<endpoint>127.0.0.1</endpoint>
</endpoints>
<actions>
<action>create</action>
<action>destroy</action>
<action>put</action>
<action>read</action>
</actions>
</map-permission>
<queue-permission name="default" principal="dev">
<endpoints>
<endpoint>127.0.0.1</endpoint>
</endpoints>
<actions>
<action>create</action>
<action>destroy</action>
<action>add</action>
<action>remove</action>
</actions>
</queue-permission>
<transaction-permission/>
</client-permissions>
</security>
</hazelcast>