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


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

Annotation to declare a container for static locks to which same default values should get applied. Also allows to declare multiple DistributedMutexLock annotations at a method.

Author:
Philipp Förmer

Required Element Summary
 DistributedStaticMutexLock[] locks
           
 
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

locks

public abstract DistributedStaticMutexLock[] locks
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. The setting will only override the default setting (max lock wait time was not set) of values in the locks() array.

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. A lock order should be always declared, as it reduces deadlock problems. The setting will only override the default setting (lock order number was not set) of values in the locks() array.

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


Copyright © 2010. All Rights Reserved.