Skip to content

About

Jedis distributed lock support

Resources

Stars

204 stars

Watchers

24 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Jedis distributed lock support

Resources

Stars

204 stars

Watchers

24 watching

Forks

Releases

Packages

Used by

Contributors

Languages