Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
2
Download as
Email Patches
Plain Diff
Browse Files
Authored by
LUOXC
6 years ago
Commit
98aeae96634dcbc30d75bb730ae210d263068420
1 parent
444f447b
fixbug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
common/src/main/java/com/yohoufo/common/cache/RedisLock.java
common/src/main/java/com/yohoufo/common/cache/RedisLock.java
View file @
98aeae9
...
...
@@ -32,7 +32,7 @@ public class RedisLock {
public
boolean
acquire
(
RedisKeyBuilder
keyBuilder
,
String
value
,
final
long
timeout
,
final
TimeUnit
unit
)
{
try
{
String
script
=
"return redis.call('set', KEYS[1],ARGV[1],ARGV[2],ARGV[3],ARGV[4])"
;
RedisScript
<
String
>
redisScript
=
new
DefaultRedisScript
(
script
,
Lo
ng
.
class
);
RedisScript
<
String
>
redisScript
=
new
DefaultRedisScript
(
script
,
Stri
ng
.
class
);
String
key
=
keyBuilder
.
getKey
();
String
result
=
redis
.
getStringRedisTemplate
().
execute
(
redisScript
,
Lists
.
newArrayList
(
key
),
value
,
SET_IF_NOT_EXIST
,
SET_WITH_EXPIRE_TIME
,
unit
.
toMillis
(
timeout
));
...
...
LUOXC
@luoxiuchun
6 years ago
Master
mentioned in commit
d749249d
Please
register
or
login
to post a comment