Class ACMTimeToLive

  • Direct Known Subclasses:
    ACMTimeToLive.MasterSessionTTL, ACMTimeToLive.RealSessionTTL

    public abstract class ACMTimeToLive
    extends java.lang.Object
    ACMTimeToLive holds the precise time at which a session will time out. It also knows the idle timeout period of the IServers (they are all the same within the same cluster)
    • Field Detail

      • mIdleTimeout

        protected int mIdleTimeout
      • mTtl

        protected final java.util.Calendar mTtl
      • mTtlSecsSinceMidnight

        protected int mTtlSecsSinceMidnight
      • mLock

        protected final RWLock mLock
    • Method Detail

      • getIdleTimeout

        public int getIdleTimeout()
      • getTtl

        public java.util.Calendar getTtl()
        getTtl will return the Calendar that represents the time to live moment.

        DEPRECATED: Since there is a complex relationship between IdleTimeout and Ttl, if you call this method and use the answer in any type of calculation, you will probably get it wrong! Instead use isExpired which will do the calculation for you
      • setTtl

        public void setTtl​(java.util.Calendar iIServerTtl)
        setTtl will set the time to live directly overwriting whatever was there before. This is tricky, because the Ttl and the idle timeout are not independent. Thus, if the idle timeout is -1 (unlimited), then setting the ttl will ultimately do nothing! The timeout will still be unlimited.

        This method is known to be called in the workflow where a remote application (via session sharing) has upped the timeout and the ACMRefreshThread checks that timeout
        iIServerTtl -
      • isExpired

        public boolean isExpired​(java.util.Calendar iNow)
        isExpired will check the internal time to live calendar against the input iNow Calendar and return true if the time to live has expired.
        iNow -
      • getSecsSinceMidnight

        public int getSecsSinceMidnight()
        getSecsSinceMidnight returns only the number of seconds since midnight that the time to live is set for. This is just a simplified version so that log files are easier to read. Do not use this method for anything but logging.
      • extendTtlByIdleTimeout

        public void extendTtlByIdleTimeout​(java.util.Calendar iNow)
      • extendTtlByIdleTimeout

        protected void extendTtlByIdleTimeout​(java.util.Calendar iNow,
                                              int iIdleTimeout)