Skip to content

Commit

Permalink
Merge branch 'master' into remove-deprecated-methods
Browse files Browse the repository at this point in the history
Conflicts:
	src/main/java/redis/clients/jedis/BinaryJedis.java
	src/main/java/redis/clients/jedis/BinaryShardedJedis.java
	src/main/java/redis/clients/jedis/JedisCluster.java
  • Loading branch information
HeartSaVioR committed Apr 22, 2015
2 parents 8558487 + ca59f9b commit 7ff6061
Show file tree
Hide file tree
Showing 52 changed files with 3,614 additions and 445 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
@@ -1,3 +1,4 @@
sudo: false
language: java
jdk:
- openjdk6
Expand All @@ -6,3 +7,6 @@ jdk:
- oraclejdk8
install: make travis-install
script: make test
cache:
directories:
- $HOME/.m2
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -296,7 +296,7 @@ release:
make start
mvn release:clean
mvn release:prepare
mvn release:perform
mvn release:perform -DskipTests
make stop

travis-install:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -81,6 +81,15 @@ jc.set("foo", "bar");
String value = jc.get("foo");
```

## FAQ

- Do you have strange stack traces?
- You're getting errors when running jedis in multi-threaded environments?
- Do you need further instructions about pipelining, transactions or sentinel?

Please check the [WIKI](https://github.com/xetorthio/jedis/wiki) for more useful information.


## I want to contribute!

That is great!
Expand Down
25 changes: 24 additions & 1 deletion pom.xml
Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.0</version>
<version>2.3</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Expand Down Expand Up @@ -133,6 +133,29 @@
<configFile>${project.basedir}/hbase-formatter.xml</configFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions src/main/java/redis/clients/jedis/BinaryClient.java
Expand Up @@ -344,6 +344,10 @@ public void spop(final byte[] key) {
sendCommand(SPOP, key);
}

public void spop(final byte[] key, final long count) {
sendCommand(SPOP, key, toByteArray(count));
}

public void smove(final byte[] srckey, final byte[] dstkey, final byte[] member) {
sendCommand(SMOVE, srckey, dstkey, member);
}
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/redis/clients/jedis/BinaryJedis.java
Expand Up @@ -163,7 +163,9 @@ public byte[] get(final byte[] key) {
public String quit() {
checkIsInMulti();
client.quit();
return client.getStatusCodeReply();
String quitReturn = client.getStatusCodeReply();
client.disconnect();
return quitReturn;
}

/**
Expand Down Expand Up @@ -1216,6 +1218,13 @@ public byte[] spop(final byte[] key) {
return client.getBinaryBulkReply();
}

public Set<byte[]> spop(final byte[] key, final long count) {
checkIsInMulti();
client.spop(key, count);
final List<byte[]> members = client.getBinaryMultiBulkReply();
return new HashSet<byte[]>(members);
}

/**
* Move the specified member from the set at srckey to the set at dstkey. This operation is
* atomic, in every given moment the element will appear to be in the source or destination set
Expand Down

0 comments on commit 7ff6061

Please sign in to comment.