Class EntityRetentionGraph


  • public class EntityRetentionGraph
    extends Object
    We have the concept of retaining up and retaining down. Retain up: retain things that depend on the target object Retain down: retain things that the target object depends on Usually, we start by retaining some object, which starts as series of "retain up" operations to grab everything that depends on that object. As each object is retained up, it typically at this point also starts a subsequent chain of retain down operations, so that the dependencies of that object are retained as well.
    Author:
    bdferris
    • Constructor Detail

    • Method Detail

      • setRetainBlocks

        public void setRetainBlocks​(boolean retainBlocks)
      • setRetainAllStopTimesForTrip

        public void setRetainAllStopTimesForTrip​(boolean retainAllStopTimesForTrip)
      • retainUp

        public void retainUp​(Object object)
        Retain up: retain things that depend on the target object For example, if you retain up on a Route, we would also retain up on the Trip objects depending on this route
        Parameters:
        object -
      • retainDown

        public void retainDown​(Object object)
        Retain down: retain things that the target object depends on For example, if you retain down on a Route, we would also retain down on the route's Agency.
        Parameters:
        object -
      • retain

        public void retain​(Object object,
                           boolean retainUp)
        Retain up: retain things that depend on the target object For example, if you retain up on a Route, we would also retain up on the Trip objects depending on this route Retain down: retain things that the target object depends on For example, if you retain down on a Route, we would also retain down on the route's Agency.
        Parameters:
        object -
      • isRetained

        public boolean isRetained​(Object object)
      • getSize

        public int getSize()