IChannelLineupProvider
The data provider object used for replacing the list of channels in the EPG.
Details
This provider is used to set/replace all of the channels for the EPG to an entirely 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(
channels
):Promise
<void
>
Add a list of channels to the commit queue.
Parameters
channels
An array of channels to be inserted.
Returns
Promise
<void
>
Details
This function can be called one or more times to add channel data for the EPG.
Inserted data will only be committed when the commit()
function is called.
Throws
IllegalStateError if this function is called after the same IChannelLineupProvider
has already
thrown an error previously in one of its methods.
Throws
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.
Throws
InternalError if this function encounters an unrecoverable error such as data store connection issues, etc. The failed channels and errors causing the failure will be included in the error message.
Throws
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()
commit(
version
):Promise
<void
>
Replaces current channel data with the pending channel data added to the commit queue.
Parameters
version
string
A string representing the version of the channel lineup that is being committed.
Returns
Promise
<void
>
Details
This function should be called after all data has been added to the commit queue using the
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.
Throws
IllegalStateError
If this function is called after the Provider has already
thrown an error in one of its methods.
Throws
InternalError
If the data cannot be committed to the data store.
Last updated: Sep 30, 2025