https://github.com/abelaska/jedis-lock
Jedis distributed lock support
https://github.com/abelaska/jedis-lock
Last synced: about 1 month ago
JSON representation
Jedis distributed lock support
- Host: GitHub
- URL: https://github.com/abelaska/jedis-lock
- Owner: abelaska
- Created: 2011-05-15T11:07:37.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2022-04-19T08:27:33.000Z (about 4 years ago)
- Last Synced: 2026-02-12T18:30:48.703Z (3 months ago)
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 205
- Watchers: 24
- Forks: 119
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-java - Jedis Lock
README
# 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:
com.github.jedis-lock
jedis-lock
1.0.0
jar
compile
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