add history mapstores
This commit is contained in:
parent
ba438187e5
commit
7b422acc4a
5 changed files with 26 additions and 41 deletions
|
|
@ -3,14 +3,16 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>imdg-hist</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>SPCEX-1.0.0.0</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>clearing-parent</artifactId>
|
<artifactId>clearing-parent</artifactId>
|
||||||
<groupId>ru.spcex.clearing</groupId>
|
<groupId>ru.spcex.clearing</groupId>
|
||||||
<version>SPCEX-1.0.0.0</version>
|
<version>SPCEX-1.0.0.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>imdg-hist</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
|
@ -30,7 +32,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ru.spcex.clearing</groupId>
|
<groupId>ru.spcex.clearing</groupId>
|
||||||
<artifactId>imdg</artifactId>
|
<artifactId>imdg</artifactId>
|
||||||
<version>SPCEX-1.0.0.0</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ru.spcex.clearing</groupId>
|
<groupId>ru.spcex.clearing</groupId>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import ru.spcex.clearing.imdg.base.AutoconfiguredMap1;
|
import ru.spcex.clearing.imdg.base.AutoconfiguredMap;
|
||||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -20,10 +20,10 @@ public class HistoryPoolMapConfigs {
|
||||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
|
||||||
private final List<AutoconfiguredMap1<?>> autoconfiguredMaps;
|
private final List<AutoconfiguredMap<?>> autoconfiguredMaps;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public HistoryPoolMapConfigs(List<AutoconfiguredMap1<?>> autoconfiguredMaps) {
|
public HistoryPoolMapConfigs(List<AutoconfiguredMap<?>> autoconfiguredMaps) {
|
||||||
this.autoconfiguredMaps = autoconfiguredMaps;
|
this.autoconfiguredMaps = autoconfiguredMaps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class HistoryPoolMapConfigs {
|
||||||
public List<MapConfig> configureEachMapStore() {
|
public List<MapConfig> configureEachMapStore() {
|
||||||
List<MapConfig> out = new ArrayList<>();
|
List<MapConfig> out = new ArrayList<>();
|
||||||
HashSet<String> existMapStores = new HashSet<>();
|
HashSet<String> existMapStores = new HashSet<>();
|
||||||
for (AutoconfiguredMap1<?> mapStore : autoconfiguredMaps) {
|
for (AutoconfiguredMap<?> mapStore : autoconfiguredMaps) {
|
||||||
try {
|
try {
|
||||||
log.debug("Link mapstore {} to map {}", mapStore.toString(), mapStore.getMapName());
|
log.debug("Link mapstore {} to map {}", mapStore.toString(), mapStore.getMapName());
|
||||||
if (StringUtils.isEmpty(mapStore.getMapName())) {
|
if (StringUtils.isEmpty(mapStore.getMapName())) {
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<addResources>true</addResources>
|
<addResources>true</addResources>
|
||||||
|
<classifier>exec</classifier>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
package ru.spcex.clearing.imdg.base;
|
package ru.spcex.clearing.imdg.base;
|
||||||
|
|
||||||
import com.hazelcast.core.MapLoader;
|
import com.hazelcast.core.MapLoader;
|
||||||
|
|
||||||
public interface AutoconfiguredMap<T> extends MapLoader<Long, T> {
|
public interface AutoconfiguredMap<T> extends MapLoader<Long, T> {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return IMDGDistributedNames.*
|
* @return IMDGDistributedNames.*
|
||||||
*/
|
*/
|
||||||
String getMapName();
|
String getMapName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Список индексируемых полей, для быстрого поиска
|
* Список индексируемых полей, для быстрого поиска
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String[] getIndexingField();
|
String[] getIndexingField();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
package ru.spcex.clearing.imdg.base;
|
|
||||||
|
|
||||||
import com.hazelcast.core.MapLoader;
|
|
||||||
|
|
||||||
public interface AutoconfiguredMap1<T> extends MapLoader<Long, T> {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return IMDGDistributedNames.*
|
|
||||||
*/
|
|
||||||
String getMapName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Список индексируемых полей, для быстрого поиска
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
String[] getIndexingField();
|
|
||||||
}
|
|
||||||
Loading…
Add table
Reference in a new issue