Persisting default TSB duration in TimeShiftManagerImpl
This is regarding the implementation of org.cablelabs.impl.manager.timeshift.TimeShiftManagerImpl class. The observation is specifically on the usage of
"m_defaultDuration" variable used in this class.
* The default TSB size to allocate when a TSB needs to be setup to support
* a TSB usage (e.g. recording) that doesn't designate a size constraint.
* This value is set in non-volatile storage and is persistent across stack
* initializations. Value is in seconds.
protected long m_defaultDuration;
The queries are:
1. m_defaultDuration is updated whenever getTSWByDuration() [ of TimeShiftManagerImpl] is called.
Is this required? Why do we need to update m_defaultDuration here?
2. m_defaultDuration is saved to persistance storage and loaded from persistance during every stack boot up.
Why we need to persist the modified value of m_defaultDuration?
3. If a client application sets the default duration, then that value will be shared across all instances of TSBs.
This seems to be a defect, isn't it?