Interface IChannelLineupProvider
interface IChannelLineupProvider
Extends com.amazon.apmf.IStandard
Interface representing the data provider object used for replacing the list of channels in the EPG.
This provider is used to set/replace all of the channels for the EPG to a whole new set of channels.
The new set of channels can be created by calling the add() function multiple times with different lists of channels,
and then when the commit() function is finally called, all previous channels in the EPG will be replaced with the entire
set of new channels. If the provider object is destroyed before calling commit(), all changes that were queued up will be lost.
Please note that this interface is not thread-safe. Do not create multiple instances of this object for use in different threads
to avoid non-deterministic behavior.
Please discard this object and create a new instance if this object has thrown an error in one of its methods.
Methods
add()
Add a list of channels to the commit queue. This function can be called one or more times to add channel data for the EPG. Inserted data will only be committed when thevoidadd(com.amazon.kepler.tv.epg_provider_models.IChannelInfo*[]channels)
commit() function is called.
Parameters
channels
com.amazon.kepler.tv.epg_provider_models.IChannelInfo*[] — Required
An array of channels to be inserted.
Throws
IllegalStateError— if this function is called after the sameIChannelLineupProviderhas already thrown an error in one of its methods.InvalidArgumentError— if any of the provided channels is invalid. The error message will include the total number of failed insertions and the reasons for the first 5 failed channels. The error message example can be found in the developer guide.InternalError— if this function encounters an unrecoverable error such as data store connection issues, etc.StorageLimitError— if this function encounters an error due to ingested data exceeding the storage limit. Consult with your Amazon contact if you encounter this error.
commit()
Replaces current channel data with the pending channel data added to the commit queue. This function should be called after all data has been added to the commit queue using thevoidcommit(stringversion)
add() function. When the provider is committed, all preexisting channels will be removed from the data store,
and replaced with all of the channels added to this provider object.
EpgLineupInformation.getLastCommittedChannelLineupVersion() will begin to return this version value
once this call succeeds.
Parameters
version
string — Required
A string representing the version of the channel lineup that is being committed.
Please refer to the developer guide for more information on how to use this field.
Throws
IllegalStateError— if this function is called after the sameIChannelLineupProviderhas already thrown an error in one of its methods.InternalError— if the data cannot be committed to the LiveTV Providers data store.

