lombok-pg -

lombok
Annotation Type Signal


@Target(value=METHOD)
@Retention(value=SOURCE)
public @interface Signal

Lock Conditions

 void methodAnnotatedWithSignal() {
   this.<LOCK_NAME>.lock();
   try {
 
     // method body
 
     this.<CONDITION_NAME>.signal();
   } finally {
     this.<LOCK_NAME>.unlock();
   }
 }
 
 


Required Element Summary
 String value
          Name of the condition.
 
Optional Element Summary
 String lockName
          Name of the lock, default is $<CONDITION_NAME>Lock.
 Position pos
          Specifies the place to put the await-block, default is AFTER.
 

Element Detail

value

public abstract String value
Name of the condition.

If no condition with the specified name exists a new Condition will be created, using this name.

pos

public abstract Position pos
Specifies the place to put the await-block, default is AFTER.

Supported positions:

  • BEFORE - before the method body
  • AFTER - after the method body

Default:
lombok.Position.AFTER

lockName

public abstract String lockName
Name of the lock, default is $<CONDITION_NAME>Lock.

If no lock with the specified name exists a new Lock will be created, using this name.

Default:
""

lombok-pg -

Copyright © 2010-2011 Philipp Eichhorn, licensed under the MIT licence.