diff options
author | waqas.ikram <waqas.ikram@ericsson.com> | 2018-06-05 16:18:01 +0100 |
---|---|---|
committer | waqas.ikram <waqas.ikram@ericsson.com> | 2018-06-05 16:18:47 +0100 |
commit | f94d7521936e66febee983ee7633aacaaf9d7390 (patch) | |
tree | bc93547a9541ca4f868a0f70f6e6d020458a1557 /plugins/plugins-context/context-metrics/src/test | |
parent | 37d6fd9069eb30d88c4ad80b5f35099ed173cc13 (diff) |
Adding apex plugins/plugins-context modules
Change-Id: I36fc295ffbd22661bf8bd091bfb20ebf6dcc7f5e
Issue-ID: POLICY-862
Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
Diffstat (limited to 'plugins/plugins-context/context-metrics/src/test')
3 files changed, 742 insertions, 0 deletions
diff --git a/plugins/plugins-context/context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java b/plugins/plugins-context/context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java new file mode 100644 index 000000000..5607f8711 --- /dev/null +++ b/plugins/plugins-context/context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java @@ -0,0 +1,57 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.plugins.context.metrics; + +import static org.junit.Assert.fail; + +import java.io.IOException; + +import org.apache.curator.test.TestingServer; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class TestMetrics { + // Zookeeper test server + TestingServer zkTestServer; + + @Before + public void beforeTest() throws Exception { + zkTestServer = new TestingServer(62181); + } + + @After + public void afterTest() throws IOException { + zkTestServer.stop(); + } + + @Test + public void getSingleJVMMetrics() { + final String[] args = {"singleJVMTestNL", "1", "32", "1000", "65536", "0", "localhost:62181", "false"}; + + try { + ConcurrentContextMetrics.main(args); + } catch (final Exception e) { + fail("Metrics test failed"); + e.printStackTrace(); + } + } +} diff --git a/plugins/plugins-context/context-metrics/src/test/resources/hazelcast/hazelcast.xml b/plugins/plugins-context/context-metrics/src/test/resources/hazelcast/hazelcast.xml new file mode 100644 index 000000000..84da4951e --- /dev/null +++ b/plugins/plugins-context/context-metrics/src/test/resources/hazelcast/hazelcast.xml @@ -0,0 +1,643 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. 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. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<hazelcast xmlns="http://www.hazelcast.com/schema/config" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <group> + <name>HazelcastGroup3.0EVAL</name> + <password>password3.0EVAL</password> + </group> + <network> + <port auto-increment="true">5706</port> + <join> + <multicast enabled="false"> + <multicast-group>224.2.2.10</multicast-group> + <multicast-port>54327</multicast-port> + </multicast> + <tcp-ip enabled="true"> + <members>10.0.0.0</members> + <!-- members>192.168.219.141</members--> + </tcp-ip> + </join> + <interfaces enabled="false"> + <!-- This value will allow hazelcast to run locally from the IDE --> + <interface>127.0.0.*</interface> + </interfaces> + </network> + <properties> + <property name="hazelcast.icmp.enabled">true</property> + <property name="hazelcast.logging.type">slf4j</property> + <!-- disable the hazelcast shutdown hook - prefer to control the shutdown + in code --> + <property name="hazelcast.shutdownhook.enabled">false</property> + <property name="hazelcast.graceful.shutdown.max.wait">60</property> + </properties> + <executor-service> + <pool-size>16</pool-size> + </executor-service> + <queue name="default"> + <!-- Maximum size of the queue. Any integer between 0 and Integer.MAX_VALUE. + 0 means Integer.MAX_VALUE. Default is 0. --> + <max-size>100000</max-size> + <!-- Maximum number of seconds for each item to stay in the queue. Items + that are not consumed in <time-to-live-seconds> will automatically get evicted + from the queue. Any integer between 0 and Integer.MAX_VALUE. 0 means infinite. + Default is 0. --> + </queue> + <map name="default"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>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> + </map> + <map name="L_ATTACH-Map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently Used). NONE is the default. --> + <eviction-policy>LRU</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>1000000</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>5</eviction-percentage> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.loading.service.buffer.L_ATTACHLoader</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>60000</write-delay-seconds> </map-store> --> + + + </map> + <map name="CTUM-Map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently Used). NONE is the default. --> + <eviction-policy>LRU</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>1000000</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>5</eviction-percentage> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>7200</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.loading.service.buffer.CTUMLoader</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>3600</write-delay-seconds> </map-store> --> + + </map> + <map name="L_HANDOVER-Map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently Used). NONE is the default. --> + <eviction-policy>LRU</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>1000000</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>5</eviction-percentage> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>3600</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.base.publishing.hazelcast.L_ATTACHStore</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + </map> + + <map name="L_SERVICE_REQUEST-Map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently Used). NONE is the default. --> + <eviction-policy>LRU</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>1000000</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>5</eviction-percentage> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>7200</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.base.publishing.hazelcast.L_HandoverStore</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + </map> + <map name="CommonCache"> + + + <!-- Number of async-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. + Valid numbers are 0 (no backup), 1, 2, 3. --> + <async-backup-count>1</async-backup-count> + + <!-- Can we read the local backup entries? Default value is false for strong + consistency. Being able to read backup data will give you greater performance. --> + <read-backup-data>true</read-backup-data> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently Used). NONE is the default. --> + <eviction-policy>LRU</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>3000000</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>5</eviction-percentage> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>7200</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.base.publishing.hazelcast.L_HandoverStore</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + </map> + + + <map name="Topology-Map"> + + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>2</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>10000000</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>0</eviction-percentage> + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.loading.service.buffer.TopologyCacheLoader</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + + </map> + <map name="Protocol-cause-code-Map"> + <near-cache> + <!-- Maximum number of seconds for each entry to stay in the near cache. + Entries that are older than <time-to-live-seconds> will get automatically + evicted from the near cache. 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 each entry can stay in the near cache as + untouched (not-read). Entries that are not read (touched) more than <max-idle-seconds> + value will get removed from the near cache. Any integer between 0 and Integer.MAX_VALUE. + 0 means Integer.MAX_VALUE. Default is 0. --> + <max-idle-seconds>0</max-idle-seconds> + + <!-- Valid values are: NONE (no extra eviction, <time-to-live-seconds> + may still apply), LRU (Least Recently Used), LFU (Least Frequently Used). + NONE is the default. Regardless of the eviction policy used, <time-to-live-seconds> + will still apply. --> + <eviction-policy>NONE</eviction-policy> + + <!-- Maximum size of the near cache. When max size is reached, cache 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>2000</max-size> + + <!-- Should the cached entries get evicted if the entries are changed + (updated or removed). true of false. Default is true. --> + <invalidate-on-change>true</invalidate-on-change> + + </near-cache> + + + + </map> + <map name="SessionId_Map"> + + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>10000000</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>0</eviction-percentage> + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>60</time-to-live-seconds> + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.loading.service.buffer.TopologyCacheLoader</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + </map> + <map name="gpeh-reasons-Map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>2</backup-count> + <!-- 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>0</eviction-percentage> + <near-cache> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <!-- 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>1000</max-size> + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + </near-cache> + </map> + <map name="tac-imei-Map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>2</backup-count> + <!-- 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>0</eviction-percentage> + + <near-cache> + <!-- 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>10000</max-size> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + </near-cache> + </map> + + <map name="CORE-DATA-Map"> + + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>2</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>10000000</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>0</eviction-percentage> + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.loading.service.buffer.TopologyCacheLoader</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + + </map> + <map name="IMSI-APN-Map"> + + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>2</backup-count> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>10000000</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>0</eviction-percentage> + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.loading.service.buffer.TopologyCacheLoader</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + + </map> + <map name="CommonDataCache"> + + + <!-- Number of async-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. + Valid numbers are 0 (no backup), 1, 2, 3. --> + <async-backup-count>1</async-backup-count> + + <!-- Can we read the local backup entries? Default value is false for strong + consistency. Being able to read backup data will give you greater performance. --> + <read-backup-data>true</read-backup-data> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently Used). NONE is the default. --> + <eviction-policy>LRU</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>3000000</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>5</eviction-percentage> + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>7200</time-to-live-seconds> + + <!-- <map-store enabled="true"> Name of the class implementing MapLoader + and/or MapStore. The class should implement at least of these interfaces + and contain no-argument constructor. Note that the inner classes are not + supported. <class-name>com.ericsson.xstream.base.publishing.hazelcast.L_HandoverStore</class-name> + Number of seconds to delay to call the MapStore.store(key, value). If the + value is zero then it is write-through so MapStore.store(key, value) will + be called as soon as the entry is updated. Otherwise it is write-behind so + updates will be stored after write-delay-seconds value by calling Hazelcast.storeAll(map). + Default value is 0. <write-delay-seconds>5</write-delay-seconds> </map-store> --> + + + </map> + + + <queue name="raw-distributer-queue"> + <!-- Maximum size of the queue. Any integer between 0 and Integer.MAX_VALUE. + 0 means Integer.MAX_VALUE. Default is 0. --> + <max-size>100000</max-size> + </queue> + <map name="queue-map"> + + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>0</backup-count> + + </map> + + <map name="radio-correlation-config-Map"> + <backup-count>2</backup-count> + <eviction-policy>NONE</eviction-policy> + <max-size>50</max-size> + <eviction-percentage>0</eviction-percentage> + <time-to-live-seconds>0</time-to-live-seconds> + </map> + + <map name="xstream-configuration-map"> + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>0</backup-count> + <time-to-live-seconds>100000</time-to-live-seconds> + </map> + + <map name="TOPIC-TASK-MAP"> + + <async-backup-count>3</async-backup-count> + + <read-backup-data>true</read-backup-data> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>1000</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>0</eviction-percentage> + + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + </map> + <map name="TOPIC-REGISTRY"> + + <async-backup-count>3</async-backup-count> + + <read-backup-data>true</read-backup-data> + <!-- Valid values are: NONE (no eviction), LRU (Least Recently Used), LFU + (Least Frequiently 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>1000</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>0</eviction-percentage> + + + + <!-- Maximum number of seconds for each entry to stay in the map. Entries + that are older than <time-to-live-seconds> and not updated for <time-to-live-seconds> + will get automatically evicted from the map. Any integer between 0 and Integer.MAX_VALUE. + 0 means infinite. Default is 0. --> + <time-to-live-seconds>0</time-to-live-seconds> + </map> + <queue name="Pooled-Topic-Request-Queue"> + <!-- Maximum size of the queue.Any integer between 0 and Integer.MAX_VALUE. + 0 means Integer.MAX_VALUE. Default is 0. --> + <max-size>100000</max-size> + </queue> + <map name="Pooled-Topic-Request-Queue-Backup-map"> + + <!-- 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. Valid + numbers are 0 (no backup), 1, 2, 3. --> + <backup-count>1</backup-count> + <eviction-policy>NONE</eviction-policy> + <time-to-live-seconds>0</time-to-live-seconds> + </map> + +</hazelcast> diff --git a/plugins/plugins-context/context-metrics/src/test/resources/infinispan/infinispan.xml b/plugins/plugins-context/context-metrics/src/test/resources/infinispan/infinispan.xml new file mode 100644 index 000000000..a8541333e --- /dev/null +++ b/plugins/plugins-context/context-metrics/src/test/resources/infinispan/infinispan.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. 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. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= +--> + +<?xml version="1.0" encoding="UTF-8"?> + +<infinispan xmlns="urn:infinispan:config:8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:8.0 http://infinispan.org/schemas/infinispan-config-8.0.xsd"> + <jgroups> + <stack-file name="external-file" path="default-configs/default-jgroups-tcp.xml" /> + </jgroups> + + <cache-container name="ApexCacheContainer" default-cache="TestContext_0.0.1"> + <transport cluster="apexCluster" stack="external-file" /> + <jmx /> + <replicated-cache name="LargeContextMap_0.0.1" mode="SYNC" statistics="true"> + <state-transfer enabled="true" /> + </replicated-cache> + <replicated-cache name="LongSameTypeContextMap_0.0.1" mode="SYNC" statistics="true"> + <state-transfer enabled="true" /> + </replicated-cache> + <replicated-cache name="TestContext_0.0.1" mode="SYNC"> + <state-transfer enabled="true" /> + </replicated-cache> + </cache-container> +</infinispan> |