net.sf.sasl.aop.distributed.lock.annotation.mutex
Annotation Type DistributedStaticMutexLock


@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface DistributedStaticMutexLock

Annotation to declare a static known lock which must be done before entering a method.

Since:
0.0.1 (sasl-aop-distributed-lock)
Author:
Philipp Förmer

Required Element Summary
 String mutex
          Lock key for the mutex, for example "queue-lock".
 
Optional Element Summary
 int lockOrderNumber
          If multiple locks should be done, than the lock order number (=lock priority) defines in which order the locks should be done.
 long maxLockWaitTime
          The maximum amount of milliseconds to wait for get the mutex locked.
 

Element Detail

mutex

public abstract String mutex
Lock key for the mutex, for example "queue-lock".

Since:
0.0.1 (sasl-aop-distributed-lock)

maxLockWaitTime

public abstract long maxLockWaitTime
The maximum amount of milliseconds to wait for get the mutex locked. Values lesser or equal to zero mean eternal wait time. The default value is zero.

Since:
0.0.1 (sasl-aop-distributed-lock)
Default:
0L

lockOrderNumber

public abstract int lockOrderNumber
If multiple locks should be done, than the lock order number (=lock priority) defines in which order the locks should be done. Lower values mean lock first. If there are multiple annotations with the same order number, than the lock order for these is arbitrary. The default value is Integer.MAX_VALUE. A lock order should be always declared, as it reduces deadlock problems.

Since:
0.0.1 (sasl-aop-distributed-lock)
Default:
2147483647


Copyright © 2010. All Rights Reserved.