Class AccessGuard
java.lang.Object
com.nomagic.magicdraw.foundation.util.AccessGuard
Utility class that provides convenient methods to wrap method calls and support locking before actual method call.
- Version:
- 1.0
-
Method Summary
-
Method Details
-
execute
Executes operation. Model lock (if it is supported) will be acquired before calling the specified operation. The lock will be released immediately after operation call end.- Type Parameters:
T
- type of operation parameter.- Parameters:
owner
- EObject that should be used to acquire lock.operation
- operation that should be executed.- Returns:
- operation call result.
- Throws:
OperationTimeoutException
- if the lock can not be acquired during specified time period.
-