Commit 3964722b authored by Matija Obreza's avatar Matija Obreza
Browse files

Firehose: Disabled message queuing and processing

- Not used in Genesys
parent d70d2be3
......@@ -18,14 +18,8 @@ package org.genesys2.spring.config;
import java.util.HashSet;
import java.util.Set;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.map.IMap;
import org.genesys.catalog.model.dataset.DatasetAccessionRef;
import org.genesys2.server.component.firehose.FirehoseEvent;
import org.genesys2.server.component.firehose.FirehoseEventListener;
import org.genesys2.server.component.firehose.FirehoseJPAListener;
import org.genesys2.server.component.firehose.FirehoseMessageProcessor;
import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.model.impl.SubsetAccessionRef;
......@@ -34,26 +28,27 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Firehose in Genesys. Used only for ES reindexing, messaging not enabled.
*
* @author Artem Hrybeniuk
*/
@Configuration
public class FirehoseConfig {
@Bean(name = "createdEventSet")
public IMap<String, FirehoseEvent> createdEvents(final HazelcastInstance hazelcast) {
return hazelcast.getMap("createdEventSet");
}
@Bean(name = "updatedEventSet")
public IMap<String, FirehoseEvent> updatedEventSet(final HazelcastInstance hazelcast) {
return hazelcast.getMap("updatedEventSet");
}
@Bean(name = "removedEventSet")
public IMap<String, FirehoseEvent> removedEventSet(final HazelcastInstance hazelcast) {
return hazelcast.getMap("removedEventSet");
}
// @Bean(name = "createdEventSet")
// public IMap<String, FirehoseEvent> createdEvents(final HazelcastInstance hazelcast) {
// return hazelcast.getMap("createdEventSet");
// }
//
// @Bean(name = "updatedEventSet")
// public IMap<String, FirehoseEvent> updatedEventSet(final HazelcastInstance hazelcast) {
// return hazelcast.getMap("updatedEventSet");
// }
//
// @Bean(name = "removedEventSet")
// public IMap<String, FirehoseEvent> removedEventSet(final HazelcastInstance hazelcast) {
// return hazelcast.getMap("removedEventSet");
// }
@Bean
public FirehoseJPAListener firehoseJPAListener(ElasticsearchService elasticsearchService) {
......@@ -80,14 +75,14 @@ public class FirehoseConfig {
return listener;
}
@Bean
public FirehoseMessageProcessor firehoseMessageProcessor() {
return new FirehoseMessageProcessor();
}
@Bean
public FirehoseEventListener firehoseEventListener() {
return new FirehoseEventListener();
}
// @Bean
// public FirehoseMessageProcessor firehoseMessageProcessor() {
// return new FirehoseMessageProcessor();
// }
//
// @Bean
// public FirehoseEventListener firehoseEventListener() {
// return new FirehoseEventListener();
// }
}
......@@ -15,17 +15,11 @@
*/
package org.genesys.test.config;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.genesys.catalog.model.dataset.DatasetAccessionRef;
import org.genesys2.server.component.firehose.FirehoseEvent;
import org.genesys2.server.component.firehose.FirehoseEventListener;
import org.genesys2.server.component.firehose.FirehoseJPAListener;
import org.genesys2.server.component.firehose.FirehoseMessageProcessor;
import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.model.impl.SubsetAccessionRef;
......@@ -39,20 +33,20 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public class FirehoseTestConfig {
@Bean(name = "createdEventSet")
public Map<String, FirehoseEvent> createdEvents() {
return Collections.synchronizedMap(new HashMap<>());
}
@Bean(name = "updatedEventSet")
public Map<String, FirehoseEvent> updatedEvents() {
return Collections.synchronizedMap(new HashMap<>());
}
@Bean(name = "removedEventSet")
public Map<String, FirehoseEvent> removedEvents() {
return Collections.synchronizedMap(new HashMap<>());
}
// @Bean(name = "createdEventSet")
// public Map<String, FirehoseEvent> createdEvents() {
// return Collections.synchronizedMap(new HashMap<>());
// }
//
// @Bean(name = "updatedEventSet")
// public Map<String, FirehoseEvent> updatedEvents() {
// return Collections.synchronizedMap(new HashMap<>());
// }
//
// @Bean(name = "removedEventSet")
// public Map<String, FirehoseEvent> removedEvents() {
// return Collections.synchronizedMap(new HashMap<>());
// }
@Bean
......@@ -79,14 +73,14 @@ public class FirehoseTestConfig {
listener.setIncludedClasses(includedClasses);
return listener;
}
@Bean
public FirehoseMessageProcessor firehoseReindexProcessor() {
return new FirehoseMessageProcessor();
}
@Bean
public FirehoseEventListener firehoseEventListener() {
return new FirehoseEventListener();
}
//
// @Bean
// public FirehoseMessageProcessor firehoseReindexProcessor() {
// return new FirehoseMessageProcessor();
// }
//
// @Bean
// public FirehoseEventListener firehoseEventListener() {
// return new FirehoseEventListener();
// }
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment