Package jadex.commons.concurrent
Interface ISynchronizator
- 
 public interface ISynchronizatorSynchronize some behavior.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinvokeLater(java.lang.Runnable action)Add an action from external thread.voidinvokeSynchronized(java.lang.Runnable code)Invoke some code synchronized with other behavior.booleanisExternalThread()Check if the external thread is accessing.
 
- 
- 
- 
Method Detail- 
invokeSynchronizedvoid invokeSynchronized(java.lang.Runnable code) Invoke some code synchronized with other behavior.- Parameters:
- code- The code to execute. The method will block the externally calling thread until the action has been executed. If the synchronizator does not accept external actions (because of termination) the method will directly fail with a runtime exception.
 
 - 
invokeLatervoid invokeLater(java.lang.Runnable action) Add an action from external thread. The contract of this method is as follows: The synchronizator ensures the execution of the external action, otherwise the method will throw a terminated exception.- Parameters:
- action- The action.
 
 - 
isExternalThreadboolean isExternalThread() Check if the external thread is accessing.- Returns:
- True, if called from an external (i.e. non-synchronized) thread.
 
 
- 
 
-