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

META-INF.spring.context.xml Maven / Gradle / Ivy

There is a newer version: 1.3.4.1
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context" xmlns:hz="http://www.hazelcast.com/schema/spring"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-4.2.xsd http://www.hazelcast.com/schema/spring http://www.hazelcast.com/schema/spring/hazelcast-spring.xsd">

    <context:annotation-config/>
    <context:component-scan base-package="org.meridor.perspective"/>

    <!-- Properties -->
    <bean id="configurationProperties"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreResourceNotFound" value="true"/>
        <property name="ignoreUnresolvablePlaceholders" value="true"/>
        <property name="locations">
            <list>
                <value>classpath:storage.properties</value>
            </list>
        </property>
    </bean>

    <!-- Hazelcast server -->
    <hz:hazelcast id="hazelcastInstance">
        <hz:config>
            <hz:group name="${perspective.storage.group.name}" password="${perspective.storage.group.password}"/>
            <hz:properties>
                <hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
                <hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
                <hz:property name="hazelcast.logging.type">slf4j</hz:property>
                <hz:property name="hazelcast.backpressure.enabled">true</hz:property>
                <hz:property name="hazelcast.prefer.ipv4.stack">${perspective.storage.ipv4only:true}</hz:property>
            </hz:properties>
            <hz:network port="${perspective.storage.port:5801}" port-auto-increment="false">
                <hz:join>
                    <hz:multicast enabled="false"/>
                    <hz:tcp-ip enabled="true">
                        <hz:members>${perspective.storage.members:127.0.0.1}</hz:members>
                    </hz:tcp-ip>
                </hz:join>
                <hz:interfaces>
                    <hz:interface>${perspective.storage.interface:127.0.0.1}</hz:interface>
                </hz:interfaces>
            </hz:network>
            
            <hz:map name="deleted-instances"
                    async-backup-count="${perspective.storage.backup.count}"
                    read-backup-data="true"
                    max-size="70"
                    max-size-policy="USED_HEAP_SIZE"
                    eviction-percentage="70"
                    eviction-policy="LRU"/>
            
            <hz:map name="deleted-images"
                    async-backup-count="${perspective.storage.backup.count}"
                    read-backup-data="true"
                    max-size="70"
                    max-size-policy="USED_HEAP_SIZE"
                    eviction-percentage="70"
                    eviction-policy="LRU"/>
            
            <hz:map name="projects_by_id"
                    async-backup-count="${perspective.storage.backup.count}"
                    read-backup-data="true"
                    time-to-live-seconds="${perspective.storage.ttl.projects}"/>
            <hz:map name="instances_by_id"
                    async-backup-count="${perspective.storage.backup.count}"
                    read-backup-data="true"
                    time-to-live-seconds="${perspective.storage.ttl.instances}"/>
            <hz:map name="images_by_id"
                    async-backup-count="${perspective.storage.backup.count}"
                    read-backup-data="true"
                    time-to-live-seconds="${perspective.storage.ttl.images}"/>
        </hz:config>
    </hz:hazelcast>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy