Package jadex.commons.concurrent
Class Token
- java.lang.Object
-
- jadex.commons.concurrent.Token
-
public class Token extends java.lang.ObjectA 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 booleanacquiredTrue, if the token is acquired.
-
Constructor Summary
Constructors Constructor Description Token()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacquire()Try to acquire the token.
-