Package org.eclipse.xtext.resource
Interface ISynchronizable<Synchronizable>
-
- All Known Implementing Classes:
SynchronizedXtextResourceSet
@Beta public interface ISynchronizable<Synchronizable>Implementations ofISynchronizableexpose a lock object that allows to guard against concurrent modifications.- Since:
- 2.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <Result> Resultexecute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Result,? super Synchronizable> unit)Execute the unit of work in a context that allows for modification.java.lang.ObjectgetLock()Exposes the coarse grained lock for thisISynchronizable.
-
-
-
Method Detail
-
getLock
java.lang.Object getLock()
Exposes the coarse grained lock for thisISynchronizable.- Returns:
- the lock instance.
-
execute
<Result> Result execute(org.eclipse.xtext.util.concurrent.IUnitOfWork<Result,? super Synchronizable> unit) throws java.lang.Exception
Execute the unit of work in a context that allows for modification.- Parameters:
unit- the action to perform. May not benull- Throws:
java.lang.Exception- the exception that was thrown by the unit.
-
-