java.lang.Object | |
↳ | com.microstrategy.webapi.acm.ACMTimeToLive |
![]() |
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)
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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.
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
isExpired will check the internal time to live calendar against the input iNow Calendar and return true if the time to live has expired.
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