Jedis Lock

Jedis distributed lock support

License

License

Categories

Categories

Jedis Data Databases
GroupId

GroupId

com.github.jedis-lock
ArtifactId

ArtifactId

jedis-lock
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Jedis Lock
Jedis distributed lock support
Source Code Management

Source Code Management

http://github.com/abelaska/jedis-lock

Download jedis-lock

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.jedis-lock/jedis-lock/ -->
<dependency>
    <groupId>com.github.jedis-lock</groupId>
    <artifactId>jedis-lock</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jedis-lock/jedis-lock/
implementation 'com.github.jedis-lock:jedis-lock:1.0.0'
// https://jarcasting.com/artifacts/com.github.jedis-lock/jedis-lock/
implementation ("com.github.jedis-lock:jedis-lock:1.0.0")
'com.github.jedis-lock:jedis-lock:jar:1.0.0'
<dependency org="com.github.jedis-lock" name="jedis-lock" rev="1.0.0">
  <artifact name="jedis-lock" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jedis-lock', module='jedis-lock', version='1.0.0')
)
libraryDependencies += "com.github.jedis-lock" % "jedis-lock" % "1.0.0"
[com.github.jedis-lock/jedis-lock "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
redis.clients : jedis jar 1.5.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.8.2

Project Modules

There are no modules declared in this project.

Jedis-lock

Jedis-lock is easy to use and simple implementation of distributed lock using Redis database and Jedis driver.

How do I use it?

You can download the latests build at: http://github.com/abelaska/jedis-lock/downloads

Or use it as a maven dependency:

<dependency>
    <groupId>com.github.jedis-lock</groupId>
    <artifactId>jedis-lock</artifactId>
    <version>1.0.0</version>
    <type>jar</type>
    <scope>compile</scope>
</dependency>

To use it just:

Jedis jedis = new Jedis("localhost");
JedisLock lock = new JedisLock(jedis, "lockname", 10000, 30000);
lock.acquire();
try {
  // do some stuff
}
finally {
  lock.release();
}

That's it.

License

The Apache Software License, Version 2.0

Versions

Version
1.0.0