io.github.snower.jaslock.spring.boot.annotations.Lock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaslock-spring-boot Show documentation
Show all versions of jaslock-spring-boot Show documentation
High-performance distributed sync service and atomic DB. Provides good multi-core support through lock queues, high-performance asynchronous binary network protocols. Can be used for spikes, synchronization, event notification, concurrency control. https://github.com/snower/slock
The newest version!
package io.github.snower.jaslock.spring.boot.annotations;
import io.github.snower.jaslock.exceptions.LockTimeoutException;
import io.github.snower.jaslock.exceptions.SlockException;
import org.springframework.core.annotation.AliasFor;
import java.lang.annotation.*;
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Lock {
@AliasFor("key")
String value() default "";
@AliasFor("value")
String key() default "";
int timeout() default 5;
int expried() default 120;
byte databaseId() default -1;
Class timeoutException() default LockTimeoutException.class;
Class exception() default SlockException.class;
}