public abstract class

ACMTimeToLive

extends Object
java.lang.Object
   ↳ com.microstrategy.webapi.acm.ACMTimeToLive
Known Direct Subclasses

Class Overview

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)

Summary

Nested Classes
class ACMTimeToLive.MasterSessionTTL  
class ACMTimeToLive.RealSessionTTL  
Fields
protected int mIdleTimeout
protected final RWLock mLock
protected final Calendar mTtl
protected int mTtlSecsSinceMidnight
Public Methods
void extendTtlByIdleTimeout(Calendar iNow)
int getIdleTimeout()
int getSecsSinceMidnight()
getSecsSinceMidnight returns only the number of seconds since midnight that the time to live is set for.
Calendar getTtl()
getTtl will return the Calendar that represents the time to live moment.
boolean isExpired(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.
void setTtl(Calendar iIServerTtl)
setTtl will set the time to live directly overwriting whatever was there before.
Protected Methods
void extendTtlByIdleTimeout(Calendar iNow, int iIdleTimeout)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected int mIdleTimeout

protected final RWLock mLock

protected final Calendar mTtl

protected int mTtlSecsSinceMidnight

Public Methods

public void extendTtlByIdleTimeout (Calendar iNow)

public int getIdleTimeout ()

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.

public 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

public boolean isExpired (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.

public void setTtl (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

Protected Methods

protected void extendTtlByIdleTimeout (Calendar iNow, int iIdleTimeout)