Package jadex.commons.concurrent
Class Token
- java.lang.Object
-
- jadex.commons.concurrent.Token
-
public class Token extends java.lang.Object
A token is initially available can be acquired once. The thread safe implementation allows multiple threads to try to acquire the token and guarantees that one and only one thread will get the token.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
acquired
True, if the token is acquired.
-
Constructor Summary
Constructors Constructor Description Token()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acquire()
Try to acquire the token.
-