Class MarkerImpl

  • All Implemented Interfaces:
    Marker

    public class MarkerImpl
    extends java.lang.Object
    implements Marker
    A MarkerImpl holds a high-water "mark" in the CAS, for all views. Typically, one is obtained via the createMarker call on a CAS. Currently only one marker is used per CAS. The Marker enables testing on each CAS update if the update is "below" or "above" the marker - this is used for implementing delta serialization, in which only the changed data is sent.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) CASImpl cas  
      protected boolean isValid  
      protected int nextFSId  
    • Constructor Summary

      Constructors 
      Constructor Description
      MarkerImpl​(int nextFSId, CASImpl cas)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getNextFSId()  
      boolean isModified​(FeatureStructure fs)
      Test if a FeatureStructure in a CAS represented by this Marker existed before the mark was set, and has been modified.
      (package private) boolean isNew​(int id)  
      boolean isNew​(FeatureStructure fs)  
      boolean isValid()
      A Marker becomes invalid when the CAS from which it was obtained is reset.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • nextFSId

        protected int nextFSId
      • isValid

        protected boolean isValid
    • Constructor Detail

      • MarkerImpl

        MarkerImpl​(int nextFSId,
                   CASImpl cas)
    • Method Detail

      • isNew

        public boolean isNew​(FeatureStructure fs)
        Specified by:
        isNew in interface Marker
        Parameters:
        fs - -
        Returns:
        true if a FeatureStructure was created after the mark represented by this Marker object.
      • isModified

        public boolean isModified​(FeatureStructure fs)
        Description copied from interface: Marker
        Test if a FeatureStructure in a CAS represented by this Marker existed before the mark was set, and has been modified. isModified(fs) == true implies that isNew(fs) == false.
        Specified by:
        isModified in interface Marker
        Parameters:
        fs - -
        Returns:
        true if a FeatureStructure that existed prior to the mark being set has been modified
      • isNew

        boolean isNew​(int id)
      • isValid

        public boolean isValid()
        Description copied from interface: Marker
        A Marker becomes invalid when the CAS from which it was obtained is reset.
        Specified by:
        isValid in interface Marker
        Returns:
        true if the Marker is still valid.
      • getNextFSId

        public int getNextFSId()