eoserver.geomesa-gs-kafka-09.1.3.3.0.source-code.applicationContext.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!--******************************************************************** * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is available at * http://www.opensource.org/licenses/apache2.0.php. *********************************************************************--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="geomesaKafkaProcessFactory" class="org.geomesa.gs.wps.kafka09.GeomesaKafkaProcessFactory"> <constructor-arg index="0" value="Geomesa Kafka Processes"/> <constructor-arg index="1" value="kafka"/> <constructor-arg index="2" value="org.geomesa.gs.wps.kafka09.GeomesaKafkaProcess"/> </bean> <bean id="replayKafkaDataStoreProcess" class="org.geomesa.gs.wps.kafka09.ReplayKafkaDataStoreProcess"> <constructor-arg index="0" ref="catalog"/> </bean> <!-- The cleanup WPS that removes outdated replay layers and schemas.--> <bean id="replayKafkaLayerReaper" class="org.geomesa.gs.wps.kafka09.ReplayKafkaLayerReaperProcess"> <constructor-arg index="0" ref="catalog"/> <!--arg1: Number of hours after creation to delete --> <constructor-arg index="1" value="1"/> </bean> <!-- Definition for how often to run the reaper--> <bean id="replayKafkaCleanupTask" class="org.springframework.scheduling.concurrent.ScheduledExecutorTask"> <property name="runnable" ref="replayKafkaLayerReaper"/> <!-- wait 5 seconds before scheduling this task --> <property name="delay" value="5000"/> <!-- run the cleanup every five minutes --> <property name="period" value="300000"/> <property name="fixedRate" value="true"/> </bean> <!-- Instantiate the reaper --> <bean id="replayKafkaCleanupTaskFactory" class="org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean" lazy-init="false"> <property name="poolSize" value="1"/> <property name="continueScheduledExecutionAfterException" value="true"/> <property name="scheduledExecutorTasks"> <list> <ref bean="replayKafkaCleanupTask"/> </list> </property> </bean> </beans>