Interface SModelAccessListener

  • All Known Implementing Classes:
    SRepositoryContentAdapter

    @Deprecated
    public interface SModelAccessListener
    Deprecated.
    DON'T USE THIS INTERFACE AS IT'S SCHEDULED FOR REMOVAL IN THE UPCOMING MPS RELEASE This interface can be implemented to track read access of individual nodes in the model. It can be used to build dependencies of the "pure" functions, i.e. functions whose result value depends only on the nodes in the repository. For a "pure" function we guarantee that while all nodes, properties and references being read during the previous invocation stay unchanged, the function returns the same value.

    All notifications are delivered inside a read lock on the repository.

    Note: in MPS read actions can occur in multiple threads in parallel. It is highly recommended to use thread-local storage or accept notifications from one thread only. Explicit synchronization may be harmful to the performance of the whole application. FIXME need better wording to stress events may come from multiple threads, perhaps some sync examples or single-thread listener classes to re-use?

    • Method Detail

      • nodeRead

        void nodeRead​(SNode node)
        Deprecated.
      • propertyRead

        void propertyRead​(SNode node,
                          String name)
        Deprecated.
      • referenceRead

        void referenceRead​(SNode node,
                           String role)
        Deprecated.