Skip to content

Commit

Permalink
Merge branch 'master' into ck-example-CO
Browse files Browse the repository at this point in the history
  • Loading branch information
chayim authored Jan 2, 2024
2 parents 5ac1902 + 93fa07e commit 049baf7
Show file tree
Hide file tree
Showing 63 changed files with 6,338 additions and 8,970 deletions.
4 changes: 4 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name-template: '$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
filter-by-commitish: true
commitish: master
autolabeler:
- label: 'maintenance'
files:
Expand Down Expand Up @@ -35,6 +37,8 @@ categories:
labels:
- 'maintenance'
- 'dependencies'
- 'documentation'
- 'docs'
- 'testing'
change-template: '- $TITLE (#$NUMBER)'
exclude-labels:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
- '**/*.rst'
branches:
- master
- '[0-9].[0-9]'
- '[0-9].x'
- '[0-9].[0-9].x'
pull_request:
branches:
- master
- '[0-9].[0-9]'
- '[0-9].x'
- '[0-9].[0-9].x'
schedule:
- cron: '0 1 * * *' # nightly build
workflow_dispatch:

jobs:

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
push:
branches:
- master
- '[0-9].[0-9]'
- '[0-9].x'
workflow_dispatch:

jobs:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/version-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
realversion="${GITHUB_REF/refs\/tags\//}"
realversion="${realversion//v/}"
echo "::set-output name=VERSION::$realversion"
echo "VERSION=$realversion" >> $GITHUB_OUTPUT
- name: Set up publishing to maven central
uses: actions/setup-java@v2
Expand All @@ -32,14 +32,14 @@ jobs:

- name: Install gpg key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
cat <(echo -e "${{ secrets.OSSH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish
run: |
mvn --no-transfer-progress \
--batch-mode \
-Dgpg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' \
-Dgpg.passphrase='${{ secrets.OSSH_GPG_SECRET_KEY_PASSWORD }}' \
-DskipTests deploy -P release
env:
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ daemonize yes
protected-mode no
requirepass cluster
port 7379
cluster-node-timeout 50
cluster-node-timeout 15000
pidfile /tmp/redis_cluster_node1.pid
logfile /tmp/redis_cluster_node1.log
save ""
Expand All @@ -223,7 +223,7 @@ daemonize yes
protected-mode no
requirepass cluster
port 7380
cluster-node-timeout 50
cluster-node-timeout 15000
pidfile /tmp/redis_cluster_node2.pid
logfile /tmp/redis_cluster_node2.log
save ""
Expand All @@ -237,7 +237,7 @@ daemonize yes
protected-mode no
requirepass cluster
port 7381
cluster-node-timeout 50
cluster-node-timeout 15000
pidfile /tmp/redis_cluster_node3.pid
logfile /tmp/redis_cluster_node3.log
save ""
Expand All @@ -251,7 +251,7 @@ daemonize yes
protected-mode no
requirepass cluster
port 7382
cluster-node-timeout 50
cluster-node-timeout 15000
pidfile /tmp/redis_cluster_node4.pid
logfile /tmp/redis_cluster_node4.log
save ""
Expand All @@ -265,7 +265,7 @@ daemonize yes
protected-mode no
requirepass cluster
port 7383
cluster-node-timeout 5000
cluster-node-timeout 15000
pidfile /tmp/redis_cluster_node5.pid
logfile /tmp/redis_cluster_node5.log
save ""
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,28 @@
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)
[![Integration](https://github.com/redis/jedis/actions/workflows/integration.yml/badge.svg?branch=master)](https://github.com/redis/jedis/actions/workflows/integration.yml)
[![codecov](https://codecov.io/gh/redis/jedis/branch/master/graph/badge.svg?token=pAstxAAjYo)](https://codecov.io/gh/redis/jedis)
[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/qRhBuY8Z)
[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/redis)

## What is Jedis?

Jedis is a Java client for [Redis](https://github.com/redis/redis "Redis") designed for performance and ease of use.

Are you looking for a high-level library to handle object mapping? See [redis-om-spring](https://github.com/redis/redis-om-spring)!

## How do I Redis?

[Learn for free at Redis University](https://university.redis.com/)

[Build faster with the Redis Launchpad](https://launchpad.redis.com/)

[Try the Redis Cloud](https://redis.com/try-free/)

[Dive in developer tutorials](https://developer.redis.com/)

[Join the Redis community](https://redis.com/community/)

[Work at Redis](https://redis.com/company/careers/jobs/)

## Supported Redis versions

The most recent version of this library supports redis version
Expand Down
47 changes: 30 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<packaging>jar</packaging>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>5.1.0-SNAPSHOT</version>
<version>5.2.0-SNAPSHOT</version>
<name>Jedis</name>
<description>Jedis is a blazingly small and sane Redis java client.</description>
<url>https://github.com/redis/jedis</url>
Expand Down Expand Up @@ -46,9 +46,11 @@

<properties>
<github.global.server>github</github.global.server>
<slf4j.version>1.7.36</slf4j.version>
<jedis.module.name>redis.clients.jedis</jedis.module.name>
<slf4j.version>1.7.36</slf4j.version>
<resilience4j.version>1.7.1</resilience4j.version>
<jackson.version>2.16.0</jackson.version>
<maven.surefire.version>3.2.3</maven.surefire.version>
</properties>

<dependencies>
Expand All @@ -60,19 +62,35 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.11.1</version>
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230618</version>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<!-- UNIX socket connection support -->
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-core</artifactId>
<version>2.8.3</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<!-- Well-known text representation of geometry in RediSearch support -->
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.19.0</version>
<scope>test</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -91,13 +109,6 @@
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-core</artifactId>
<version>2.6.1</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
Expand All @@ -107,15 +118,17 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
<version>${jackson.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.14.2</version>
<version>${jackson.version}</version>
<scope>test</scope>
</dependency>

<!-- circuit breaker / failover -->
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-all</artifactId>
Expand Down Expand Up @@ -158,7 +171,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.11</version>
<executions>
<execution>
<goals>
Expand All @@ -184,7 +197,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>${maven.surefire.version}</version>
<configuration>
<systemPropertyVariables>
<redis-hosts>${redis-hosts}</redis-hosts>
Expand Down Expand Up @@ -212,7 +225,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.3</version>
<configuration>
<source>8</source><!-- Until JDK 11+ -->
<detectJavaApiLink>false</detectJavaApiLink><!-- Until JDK 11+ -->
Expand Down Expand Up @@ -313,7 +326,7 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>${maven.surefire.version}</version>
<configuration>
<test>**/examples/*Example.java</test>
</configuration>
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/redis/clients/jedis/AbstractPipeline.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package redis.clients.jedis;

import java.io.Closeable;

public abstract class AbstractPipeline extends PipeliningBase implements Closeable {

protected AbstractPipeline(CommandObjects commandObjects) {
super(commandObjects);
}

@Override
public abstract void close();

/**
* Synchronize pipeline by reading all responses.
*/
public abstract void sync();

public Response<Long> publish(String channel, String message) {
return appendCommand(commandObjects.publish(channel, message));
}

public Response<Long> publish(byte[] channel, byte[] message) {
return appendCommand(commandObjects.publish(channel, message));
}
}
35 changes: 35 additions & 0 deletions src/main/java/redis/clients/jedis/AbstractTransaction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package redis.clients.jedis;

import java.io.Closeable;
import java.util.List;

public abstract class AbstractTransaction extends PipeliningBase implements Closeable {

protected AbstractTransaction() {
super(new CommandObjects());
}

public abstract void multi();

/**
* Must be called before {@link AbstractTransaction#multi() MULTI}.
*/
public abstract String watch(final String... keys);

/**
* Must be called before {@link AbstractTransaction#multi() MULTI}.
*/
public abstract String watch(final byte[]... keys);

public abstract String unwatch();

@Override public abstract void close();

public abstract List<Object> exec();

public abstract String discard();

public Response<Long> waitReplicas(int replicas, long timeout) {
return appendCommand(commandObjects.waitReplicas(replicas, timeout));
}
}
Loading

0 comments on commit 049baf7

Please sign in to comment.