Class UpgradeableSessionTracker

    • Field Detail

      • localSessionsEnabled

        protected boolean localSessionsEnabled
    • Constructor Detail

      • UpgradeableSessionTracker

        public UpgradeableSessionTracker()
    • Method Detail

      • start

        public void start()
      • isTrackingSession

        public boolean isTrackingSession​(long sessionId)
        Specified by:
        isTrackingSession in interface SessionTracker
        Returns:
        whether or not the SessionTracker is aware of this session
      • isLocalSession

        public boolean isLocalSession​(long sessionId)
      • isUpgradingSession

        public boolean isUpgradingSession​(long sessionId)
      • finishedUpgrading

        public void finishedUpgrading​(long sessionId)
      • isGlobalSession

        public abstract boolean isGlobalSession​(long sessionId)
      • upgradeSession

        public int upgradeSession​(long sessionId)
        Upgrades the session to a global session. This simply removes the session from the local tracker and marks it as global. It is up to the caller to actually queue up a transaction for the session.
        Parameters:
        sessionId -
        Returns:
        session timeout (-1 if not a local session)
      • removeLocalSession

        protected void removeLocalSession​(long sessionId)
      • getLocalSessionCount

        public long getLocalSessionCount()
        Description copied from interface: SessionTracker
        If this session tracker supports local sessions, return how many. otherwise returns 0;
        Specified by:
        getLocalSessionCount in interface SessionTracker
      • localSessions

        public java.util.Set<java.lang.Long> localSessions()
        Description copied from interface: SessionTracker
        Get a set of local session IDs
        Specified by:
        localSessions in interface SessionTracker