-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3ab842
commit c4df6b3
Showing
8 changed files
with
290 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,15 +41,11 @@ jobs: | |
- name: "Test, Check style, Check PMD, Check license with Maven and Java8" | ||
if: matrix.java == '8' | ||
run: | | ||
./mvnw -T 4C clean test \ | ||
-Dmaven.git-commit-id.skip=true \ | ||
-e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; | ||
./mvnw -T 4C clean test | ||
- name: "Test with Maven and Java${{ matrix.java }}" | ||
if: matrix.java != '8' | ||
run: | | ||
./mvnw -T 4C clean test \ | ||
-Dmaven.git-commit-id.skip=true \ | ||
-e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; | ||
./mvnw -T 4C clean test | ||
- name: "Codecov" | ||
if: matrix.java == '8' | ||
uses: codecov/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/java/org/redis2asp/protocol/request/GetRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.redis2asp.protocol.request; | ||
|
||
import org.redis2asp.protocol.RedisRequest; | ||
import org.redis2asp.protocol.RedisResponse; | ||
import org.redis2asp.protocol.response.BulkResponse; | ||
|
||
public class GetRequest implements RedisRequest<byte[]> { | ||
|
||
String key; | ||
|
||
BulkResponse response = new BulkResponse(); | ||
|
||
public GetRequest(String key) { | ||
this.key = key; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
|
||
@Override | ||
public void setResponse(byte[] data) { | ||
this.response.setData(data); | ||
} | ||
|
||
@Override | ||
public RedisResponse<byte[]> getResponse() { | ||
return response; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<configuration> | ||
<!-- file-appender properties --> | ||
<property name="LOG_FILE_PATH" | ||
value="${user.home}/logs/redis2asp"/> | ||
<property name="FILE_LOG_PATTERN" | ||
value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- [%t] [%logger] [%M] [%X{X-TX-XID:-}]: %m%n%wEx2"/> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<Pattern>${FILE_LOG_PATTERN}</Pattern> | ||
<charset>UTF-8</charset> | ||
</encoder> | ||
</appender> | ||
|
||
<!--ALL--> | ||
<appender name="FILE_ALL" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>${LOG_FILE_PATH}/${APPLICATION_NAME:-redis2asp}redis2asp.all.log</file> | ||
<append>true</append> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-redis2asp}redis2asp.all.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> | ||
<maxFileSize>2GB</maxFileSize> | ||
<MaxHistory>7</MaxHistory> | ||
<totalSizeCap>7GB</totalSizeCap> | ||
<cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
</rollingPolicy> | ||
<encoder> | ||
<Pattern>${FILE_LOG_PATTERN}</Pattern> | ||
<charset>UTF-8</charset> | ||
</encoder> | ||
</appender> | ||
|
||
<!--WARN--> | ||
<appender name="FILE_WARN" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> | ||
<level>WARN</level> | ||
<onMatch>ACCEPT</onMatch> | ||
<onMismatch>DENY</onMismatch> | ||
</filter> | ||
<file>${LOG_FILE_PATH}/${APPLICATION_NAME:-redis2asp}redis2asp.warn.log</file> | ||
<append>true</append> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-redis2asp}redis2asp.warn.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> | ||
<maxFileSize>2GB</maxFileSize> | ||
<MaxHistory>7</MaxHistory> | ||
<totalSizeCap>7GB</totalSizeCap> | ||
<cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
</rollingPolicy> | ||
<encoder> | ||
<Pattern>${FILE_LOG_PATTERN}</Pattern> | ||
<charset>UTF-8</charset> | ||
</encoder> | ||
</appender> | ||
|
||
<!--ERROR--> | ||
<appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> | ||
<level>ERROR</level> | ||
<onMatch>ACCEPT</onMatch> | ||
<onMismatch>DENY</onMismatch> | ||
</filter> | ||
<file>${LOG_FILE_PATH}/${APPLICATION_NAME:-redis2asp}redis2asp.error.log</file> | ||
<append>true</append> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${LOG_FILE_PATH}/history/${APPLICATION_NAME:-redis2asp}redis2asp.error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> | ||
<maxFileSize>2GB</maxFileSize> | ||
<MaxHistory>7</MaxHistory> | ||
<totalSizeCap>7GB</totalSizeCap> | ||
<cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
</rollingPolicy> | ||
<encoder> | ||
<Pattern>${FILE_LOG_PATTERN}</Pattern> | ||
<charset>UTF-8</charset> | ||
</encoder> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE"/> | ||
<appender-ref ref="FILE_ALL"/> | ||
<appender-ref ref="FILE_WARN"/> | ||
<appender-ref ref="FILE_ERROR"/> | ||
</root> | ||
</configuration> |
Oops, something went wrong.