Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
80 lines (71 sloc) 3.7 KB
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:hz="http://www.hazelcast.com/schema/spring" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<hz:hazelcast id="instance">
<hz:config>
<hz:group name="dev" password="password"/>
<hz:network port="5701" port-auto-increment="true">
<hz:join>
<hz:multicast enabled="true"
multicast-group="224.2.2.3"
multicast-port="54327"/>
</hz:join>
</hz:network>
<hz:map name="testMap">
<hz:entry-listeners>
<hz:entry-listener local="true" implementation="entryEventServiceDelegate"/>
</hz:entry-listeners>
</hz:map>
</hz:config>
</hz:hazelcast>
<bean id="entryEventServiceDelegate" class="com.hazelcast.samples.entrylistener.handoff.service.EntryEventServiceDelegate">
<constructor-arg index="0" ref="threadPoolEntryEventService"/>
<constructor-arg index="1" ref="loggingCompletionListener"/>
</bean>
<bean id="threadPoolEntryEventService" class="com.hazelcast.samples.entrylistener.handoff.service.ThreadPoolEntryEventService">
<!-- Number of Executors -->
<constructor-arg index="0">
<value>5</value>
</constructor-arg>
<!-- Number of Threads per Executor -->
<constructor-arg index="1">
<value>1</value>
</constructor-arg>
<!-- Queue Size of the Executors -->
<constructor-arg index="2">
<value>100</value>
</constructor-arg>
<!-- The Long Running Thread Listener -->
<constructor-arg index="3" ref="loggingLongRunningThreadListener"/>
<!-- The EntryEventProcessFactory -->
<constructor-arg index="4" ref="entryEventTypeProcessorFactory"/>
</bean>
<bean id="loggingCompletionListener" class="com.hazelcast.samples.entrylistener.handoff.service.listener.LoggingCompletionListener"/>
<bean id="loggingLongRunningThreadListener" class="com.hazelcast.samples.entrylistener.handoff.service.listener.LoggingLongRunningThreadListener">
<constructor-arg index="0">
<value>1</value>
</constructor-arg>
<constructor-arg index="1">
<bean class="java.util.concurrent.TimeUnit" factory-method="valueOf">
<constructor-arg value="MINUTES" />
</bean>
</constructor-arg>
</bean>
<!-- The EntryEventTypeProcessorFactory that is used by the EntryEventService -->
<bean id="entryEventTypeProcessorFactory" class="com.hazelcast.samples.entrylistener.handoff.service.processors.EntryEventTypeProcessorFactory">
<constructor-arg index="0">
<map key-type="com.hazelcast.core.EntryEventType">
<entry key="ADDED" value-ref="wordCountEntryEventProcessorClass"/>
</map>
</constructor-arg>
</bean>
<bean id="wordCountEntryEventProcessorClass" class="java.lang.Class" factory-method="forName">
<constructor-arg index="0">
<value>com.hazelcast.samples.entrylistener.handoff.service.processors.WordCountEntryEventProcessor</value>
</constructor-arg>
</bean>
</beans>
You can’t perform that action at this time.