Skip to content

Commit fe9b538

Browse files
author
Wang, Gang(Gary)
committed
MNEMONIC-326: Create a new module for queryable memory services
1 parent 3703345 commit fe9b538

File tree

8 files changed

+540
-0
lines changed

8 files changed

+540
-0
lines changed

mnemonic-query/pom.xml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.mnemonic</groupId>
26+
<artifactId>mnemonic-parent</artifactId>
27+
<version>0.8.0-incubating-SNAPSHOT</version>
28+
<relativePath>../pom.xml</relativePath>
29+
</parent>
30+
31+
<artifactId>mnemonic-query</artifactId>
32+
<name>mnemonic-query</name>
33+
<packaging>jar</packaging>
34+
35+
<dependencies>
36+
<dependency>
37+
<groupId>org.apache.mnemonic</groupId>
38+
<artifactId>mnemonic-core</artifactId>
39+
<version>${project.version}</version>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.apache.mnemonic</groupId>
43+
<artifactId>mnemonic-collections</artifactId>
44+
<version>${project.version}</version>
45+
<scope>compile</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.apache.commons</groupId>
49+
<artifactId>commons-lang3</artifactId>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.testng</groupId>
53+
<artifactId>testng</artifactId>
54+
</dependency>
55+
<!-- logging dependencies -->
56+
<!-- assume all APIs will be used -->
57+
<dependency>
58+
<groupId>org.slf4j</groupId>
59+
<artifactId>slf4j-api</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.slf4j</groupId>
63+
<artifactId>jul-to-slf4j</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.slf4j</groupId>
67+
<artifactId>jcl-over-slf4j</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>log4j</groupId>
71+
<artifactId>log4j</artifactId>
72+
</dependency>
73+
<dependency>
74+
<groupId>org.slf4j</groupId>
75+
<artifactId>slf4j-log4j12</artifactId>
76+
</dependency>
77+
</dependencies>
78+
79+
<build>
80+
<plugins>
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-compiler-plugin</artifactId>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-jar-plugin</artifactId>
88+
</plugin>
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-shade-plugin</artifactId>
92+
<executions>
93+
<execution>
94+
<phase>package</phase>
95+
<goals>
96+
<goal>shade</goal>
97+
</goals>
98+
</execution>
99+
</executions>
100+
<configuration>
101+
<minimizeJar>true</minimizeJar>
102+
</configuration>
103+
</plugin>
104+
<plugin>
105+
<groupId>org.bsc.maven</groupId>
106+
<artifactId>maven-processor-plugin</artifactId>
107+
<executions>
108+
<execution>
109+
<id>process-test</id>
110+
<goals><goal>process-test</goal></goals>
111+
<phase>generate-test-sources</phase>
112+
<configuration>
113+
<compilerArguments>-XDenableSunApiLintControl</compilerArguments>
114+
<processors>
115+
<processor>${project.parent.groupId}.DurableEntityProcessor</processor>
116+
</processors>
117+
</configuration>
118+
</execution>
119+
<execution>
120+
<id>process</id>
121+
<goals><goal>process</goal></goals>
122+
<phase>generate-sources</phase>
123+
<configuration>
124+
<compilerArguments>-XDenableSunApiLintControl</compilerArguments>
125+
<processors>
126+
<processor>${project.parent.groupId}.DurableEntityProcessor</processor>
127+
</processors>
128+
</configuration>
129+
</execution>
130+
</executions>
131+
</plugin>
132+
</plugins>
133+
</build>
134+
135+
<profiles>
136+
<profile>
137+
<id>proguard</id>
138+
<build>
139+
<plugins>
140+
<plugin>
141+
<groupId>com.github.wvengen</groupId>
142+
<artifactId>proguard-maven-plugin</artifactId>
143+
<executions>
144+
<execution>
145+
<phase>package</phase>
146+
<goals><goal>proguard</goal></goals>
147+
</execution>
148+
</executions>
149+
<configuration>
150+
<maxMemory>4096m</maxMemory>
151+
<proguardInclude>${basedir}/proguard.conf</proguardInclude>
152+
<libs>
153+
<lib>${java.home}/lib/rt.jar</lib>
154+
</libs>
155+
</configuration>
156+
</plugin>
157+
</plugins>
158+
</build>
159+
</profile>
160+
<profile>
161+
<id>doc</id>
162+
<build>
163+
<plugins>
164+
<plugin>
165+
<groupId>org.apache.maven.plugins</groupId>
166+
<artifactId>maven-javadoc-plugin</artifactId>
167+
<configuration>
168+
<additionalparam>-Xdoclint:all -Xdoclint:-missing</additionalparam>
169+
</configuration>
170+
<executions>
171+
<execution>
172+
<id>attach-javadocs</id>
173+
<goals>
174+
<goal>jar</goal>
175+
</goals>
176+
</execution>
177+
</executions>
178+
</plugin>
179+
</plugins>
180+
</build>
181+
</profile>
182+
<profile>
183+
<id>test</id>
184+
<build>
185+
<plugins>
186+
<plugin>
187+
<groupId>org.apache.maven.plugins</groupId>
188+
<artifactId>maven-surefire-plugin</artifactId>
189+
<configuration>
190+
<argLine>-Xmx2g -XX:MaxPermSize=1g</argLine>
191+
<suiteXmlFiles>
192+
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
193+
</suiteXmlFiles>
194+
</configuration>
195+
</plugin>
196+
</plugins>
197+
</build>
198+
</profile>
199+
</profiles>
200+
201+
</project>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.mnemonic.query.memory;
18+
19+
import org.apache.mnemonic.DurableType;
20+
21+
public class AttributeInfo {
22+
23+
private String name;
24+
25+
private DurableType type;
26+
27+
private SortOrder sortOrder;
28+
29+
private long entityFieldId;
30+
31+
public String getName() {
32+
return name;
33+
}
34+
35+
public void setName(String name) {
36+
this.name = name;
37+
}
38+
39+
public SortOrder getSortOrder() {
40+
return sortOrder;
41+
}
42+
43+
public void setSortOrder(SortOrder sortOrder) {
44+
this.sortOrder = sortOrder;
45+
}
46+
47+
public DurableType getType() {
48+
return type;
49+
}
50+
51+
public void setType(DurableType type) {
52+
this.type = type;
53+
}
54+
55+
public long getEntityFieldId() {
56+
return entityFieldId;
57+
}
58+
59+
public void setEntityFieldId(long entityFieldId) {
60+
this.entityFieldId = entityFieldId;
61+
}
62+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.mnemonic.query.memory;
18+
19+
public class EntityInfo {
20+
21+
private String className;
22+
23+
private String entityName;
24+
25+
private AttributeInfo[] attributeInfo;
26+
27+
public String getClassName() {
28+
return className;
29+
}
30+
31+
public void setClassName(String className) {
32+
this.className = className;
33+
}
34+
35+
public String getEntityName() {
36+
return entityName;
37+
}
38+
39+
public void setEntityName(String entityName) {
40+
this.entityName = entityName;
41+
}
42+
43+
public AttributeInfo[] getAttributeInfo() {
44+
return attributeInfo;
45+
}
46+
47+
public void setAttributeInfo(AttributeInfo[] attributeInfo) {
48+
this.attributeInfo = attributeInfo;
49+
}
50+
}

0 commit comments

Comments
 (0)