Interface ISynchronizable<Synchronizable>

  • All Known Implementing Classes:
    SynchronizedXtextResourceSet

    @Beta
    public interface ISynchronizable<Synchronizable>
    Implementations of ISynchronizable expose a lock object that allows to guard against concurrent modifications.
    Since:
    2.4
    • Method Detail

      • getLock

        java.lang.Object getLock()
        Exposes the coarse grained lock for this ISynchronizable.
        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 be null
        Throws:
        java.lang.Exception - the exception that was thrown by the unit.