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


@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,PARAMETER})
public @interface DistributedDynamicMutexLockKeys

Annotation to declare a container for dynamic resolved locks to which same default values should get applied. Also allows to declare multiple DistributedMutexLockKeys annotations at a parameter or method.

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

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.
 DistributedDynamicMutexLockKey[] locks
          Array of of lock keys to which same default values should get applied or that should get sorted.
 long maxLockWaitTime
          The maximum amount of milliseconds to wait for get mutexes locked.
 String postfix
          A postfix string that should get appended to the end of the mutex lock key.
 String prefix
          A prefix string that should get pushed before the mutex lock key.
 

locks

public abstract DistributedDynamicMutexLockKey[] locks
Array of of lock keys to which same default values should get applied or that should get sorted.

Since:
0.0.1 (sasl-aop-distributed-lock)
Default:
{}

prefix

public abstract String prefix
A prefix string that should get pushed before the mutex lock key. For example "customer-id-lock-". The default value is "". The setting will only override the default setting (prefix was not set) of values in the locks() array.

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

postfix

public abstract String postfix
A postfix string that should get appended to the end of the mutex lock key. For example "-customer-id-lock". The default value is "". The setting will only override the default setting (postfix was not set) of values in the locks() array.

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

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 will be chosen by the natural ordering of the lock keys. The default value is Integer.MAX_VALUE. 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

maxLockWaitTime

public abstract long maxLockWaitTime
The maximum amount of milliseconds to wait for get mutexes locked. The setting will only override the default setting of values in the locks() array. 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


Copyright © 2010. All Rights Reserved.