package com.izouma.nineth.annotations;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RedisLock {
    String value();

    long expire() default 10;

    TimeUnit unit() default TimeUnit.SECONDS;

    Behavior behavior() default Behavior.THROW;

    enum Behavior {
        WAIT,
        THROW
    }

}
