Jonathan Leibiusky
8fef62e21d
Merge branch 'pubsub-concurrency' of github.com:ibuildthecloud/jedis into ibuildthecloud-pubsub-concurrency
...
Conflicts:
src/main/java/redis/clients/jedis/Connection.java
src/main/java/redis/clients/jedis/JedisPubSub.java
2014-01-31 13:28:29 -05:00
Jonathan Leibiusky
105ca9f5bb
Reformat all files in the project according to java conventions.
2014-01-31 11:24:06 -05:00
Darren Shepherd
f11c1622de
Allow safe multi-threaded access to JedisPubSub
...
If Thread A calls a subscribe method on Jedis it will block on a socket read
call waiting for messages or subscription notifications. Thread B is now free
to call additional methods on JedisPubSub to change the current subscriptions
that thread A is waiting for. Essentially Thread A will do reads on the
socket and Thread B will do writes.
An issue occurs in that while Thread A is doing reads, in the
getObjectMultiBulkReply() method there is an implicit flush() call. This
means both Thread A and Thread B may do a write to the socket. Under this
situation if Thread A does a flush while Thread B is writing the internal
buffer will be corrupted. The fix is to make thread A never call flush().
This allows Thread A to be solely reads and Thread B to be solely writes.
Additionally since Thread B is sending commands, the internal pipeline count
is incremented and never decremented. So when Thread A terminates it's read
it resets the pipeline count.
2014-01-16 23:48:08 -07:00
Jonathan Leibiusky
beb999d50a
when setting timeout infinite, make sure it is connected first
2012-08-02 16:57:14 -03:00
Jonathan Leibiusky
4f5acab0fb
Merge branch 'Issue242' of git://github.com/ivowiblo/jedis into issue242
...
Conflicts:
src/main/java/redis/clients/jedis/BinaryClient.java
src/main/java/redis/clients/jedis/Client.java
src/main/java/redis/clients/jedis/Commands.java
src/main/java/redis/clients/jedis/Jedis.java
src/main/java/redis/clients/jedis/ShardedJedis.java
2012-05-06 19:47:00 -03:00
Eric Hauser
5a6d98ac56
fix broken instance reference to protocol
2012-04-19 16:48:18 -04:00
Eric Hauser
94e3d25ab8
Merge pull request #211 from raszi/9d4d11ef466d7a890e763bb1b98b044e3d8635b4
...
My previous static Protocol fix
2012-04-19 11:51:29 -07:00
ivowiblo
088f84b6b2
Extra space is removed
2012-04-17 21:37:33 -04:00
Ivo Ramirez
75e52b9a26
z*range commands now receive long instead of int. #242
2012-04-17 21:34:56 -04:00
Ivo Ramirez
9bf19c6237
Binary scripting API is tested
2012-04-14 10:17:41 -03:00
Ivo Ramirez
9dc89626ac
Eval and Evalsha is now supported
...
Conflicts:
src/main/java/redis/clients/jedis/Client.java
src/main/java/redis/clients/jedis/Jedis.java
2012-04-14 08:41:27 -03:00
KARASZI István
9d4d11ef46
no need to instantiate the Protocol class that can be static
2011-09-26 15:40:16 +02:00
Eric Hauser
b7ee1fe29a
Merge pull request #189 from vsoskov/jedis
...
---
the exception is returned in the list with the not formatted and formatted values.
Response.get throws the exception.
2011-09-13 23:08:20 -04:00
Eric Hauser
dba5e2c3d4
Merge pull request #199 from sehugg/jedis
...
---
The subscribe and psubscribe operations call setTimeoutInfinite() since they never return on their own. If the Redis server goes away without closing the connection, the connection can hang indefinitely. Turning on keep-alive will allow the connection to eventually timeout and attempt reconnection.
Note that keepalive must also be enabled on your server, see the Linux HOWTOs on how to do this.
2011-09-12 22:49:12 -04:00
wjw465150
a688c610ae
wjw465150 add socket performance
2011-09-12 22:47:17 -04:00
Vladimir Soskov
22d4d3fc53
fixing Issue 188
2011-07-31 19:50:16 -07:00
Jonathan Leibiusky
607d31d96b
On reconnection, select the correct db index
2011-05-15 22:17:21 -03:00
Dario Guzik
56fd098ee2
keep old connection file. DO NOT CROSS BRANCHES AGAIN
2011-05-15 18:24:23 -03:00
Dario Guzik
9af964e88d
Merge branch 'master' of https://github.com/xetorthio/jedis into Cleaning
2011-05-13 18:03:44 -03:00
Dario Guzik
ace1588501
disconnection
2011-05-13 18:03:38 -03:00
Jonathan Leibiusky
6707b62342
pipeline return formatted values
2011-04-06 01:07:20 -03:00
Jonathan Leibiusky
80d2f9d103
Merge branch 'pipeline-multi' of git://github.com/pietern/jedis into pietern-pipeline-multi
...
Conflicts:
src/main/java/redis/clients/jedis/Connection.java
src/main/java/redis/clients/jedis/Transaction.java
2011-02-28 15:56:11 -03:00
Pieter Noordhuis
dac1d259c0
Don't wait for QUEUED replies in MULTI
2011-02-25 13:44:54 +01:00
Pieter Noordhuis
9dd23cec81
Flush to socket when starting to read
2011-02-25 13:00:34 +01:00
Steven Hugg
33ceb6da0f
set keepAlive on pub/sub sockets (infinite timeout) in case we don't see the connection close
2011-02-16 09:59:31 -05:00
Mike Hobbs
dad1b8c394
Connect.connect() now honors timeout value
2011-02-10 15:00:53 -03:00
Jonathan Leibiusky
2a4a43f4cd
add JedisDataException and JedisConnectionException
2011-01-30 17:46:17 -03:00
Neil Gentleman
d18cc4bd13
incr/decr operate on 64-bit numbers. Switching from Integer to Long
2010-11-25 09:45:34 -03:00
Jonathan Leibiusky
098de44a07
add support for java 1.5
2010-11-21 19:53:43 -03:00
Jonathan Leibiusky
e7582644b1
Merge branch 'ApacheCommonsPool' of git://github.com/yaourt/jedis
2010-11-21 17:31:15 -03:00
Jonathan Leibiusky
b013a74c44
Merge branch 'binaryAPI' of git://github.com/yaourt/jedis
...
Conflicts:
src/main/java/redis/clients/jedis/Connection.java
src/main/java/redis/clients/jedis/Jedis.java
src/main/java/redis/clients/jedis/ShardedJedis.java
2010-11-15 23:55:57 -03:00
Jonathan Leibiusky
f62548931c
Add a pool for sharded jedis
2010-11-10 13:41:41 -03:00
Yaourt
3d8d152227
Apache Jakarta commons-pool based JedisPool.
2010-11-07 22:32:19 +01:00
Yaourt
2836d78c44
Fix some more U tests ...
2010-11-05 10:17:03 +01:00
Yaourt
afad308e29
Fix some more U tests ...
2010-11-05 09:57:54 +01:00
Yaourt
ead39394a1
Fix some broken U tests (there are stille broken tests, working on it)
2010-11-04 18:55:00 +01:00
Yaourt
85ce39ca3e
BinaryClient is born
2010-11-04 12:22:40 +01:00
Yaourt
377c266dc1
Add a sendCommand(String byte[]...) method.
2010-11-04 10:31:20 +01:00
Yaourt
ddd3932906
Code cleanup (final method params)
2010-11-04 10:22:39 +01:00
Yaourt
daec806c5a
UTF-8 charset declared in Protocol, added a getBinaryBulkReply() in Connection
2010-11-04 09:31:21 +01:00
Jonathan Leibiusky
07f5820a32
getIntegerReply should return Integer and not int to support null replies
2010-11-02 12:33:28 -03:00
Jonathan Leibiusky
d70c42edb9
Added sharding+pipelining support
2010-11-02 01:04:02 -03:00
Alex Tkachman
53efb8471f
simplification of sharding
2010-09-16 15:41:04 +02:00
Jonathan Leibiusky
ed20894c95
Refactores primitive types in the API. Now int -> Integer and double -> Double.
...
This is to support Redis null values
2010-09-15 14:41:35 -03:00
Alex Tkachman
f9e7887e02
more optimizations on write side
2010-09-12 17:05:58 +02:00
Alex Tkachman
a521841ff5
a bit faster implementation of output stream for Redis
2010-09-11 21:15:38 +03:00
KARASZI István
c6507e6187
connect in sendCommand() and don't check with isConnected() two times
2010-09-11 00:03:28 +08:00
KARASZI István
7c680634a3
autoboxings fixed
2010-09-10 23:53:19 +08:00
Jonathan Leibiusky
68905396d5
Fixed EOFException issue with JedisPool. Was trying to reuse a broken Jedis
2010-09-04 11:29:54 -03:00
Jonathan Leibiusky
048d87d26c
Addded default socket timeout of 2000 ms
2010-08-08 14:52:35 -03:00