/AWS1/IF_MDT=>CREATEPREFETCHSCHEDULE()¶
About CreatePrefetchSchedule¶
Creates a prefetch schedule for a playback configuration. A prefetch schedule allows you to tell MediaTailor to fetch and prepare certain ads before an ad break happens. For more information about ad prefetching, see Using ad prefetching in the MediaTailor User Guide.
Method Signature¶
METHODS /AWS1/IF_MDT~CREATEPREFETCHSCHEDULE
IMPORTING
!IO_CONSUMPTION TYPE REF TO /AWS1/CL_MDTPREFETCHCONSUMPT00 OPTIONAL
!IV_NAME TYPE /AWS1/MDT__STRING OPTIONAL
!IV_PLAYBACKCONFIGURATIONNAME TYPE /AWS1/MDT__STRING OPTIONAL
!IO_RETRIEVAL TYPE REF TO /AWS1/CL_MDTPREFETCHRETRIEVAL OPTIONAL
!IO_RECURRINGPREFETCHCONF TYPE REF TO /AWS1/CL_MDTRECURRINGPREFETC00 OPTIONAL
!IV_SCHEDULETYPE TYPE /AWS1/MDTPREFETCHSCHEDULETYPE OPTIONAL
!IV_STREAMID TYPE /AWS1/MDT__STRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mdtcreprefetchschdrsp
RAISING
/AWS1/CX_MDTCLIENTEXC
/AWS1/CX_MDTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/MDT__STRING /AWS1/MDT__STRING¶
The name to assign to the schedule request.
iv_playbackconfigurationname TYPE /AWS1/MDT__STRING /AWS1/MDT__STRING¶
The name to assign to the playback configuration.
Optional arguments:¶
io_consumption TYPE REF TO /AWS1/CL_MDTPREFETCHCONSUMPT00 /AWS1/CL_MDTPREFETCHCONSUMPT00¶
The configuration settings for how and when MediaTailor consumes prefetched ads from the ad decision server for single prefetch schedules. Each consumption configuration contains an end time and an optional start time that define the consumption window. Prefetch schedules automatically expire no earlier than seven days after the end time.
io_retrieval TYPE REF TO /AWS1/CL_MDTPREFETCHRETRIEVAL /AWS1/CL_MDTPREFETCHRETRIEVAL¶
The configuration settings for retrieval of prefetched ads from the ad decision server. Only one set of prefetched ads will be retrieved and subsequently consumed for each ad break.
io_recurringprefetchconf TYPE REF TO /AWS1/CL_MDTRECURRINGPREFETC00 /AWS1/CL_MDTRECURRINGPREFETC00¶
The configuration that defines how and when MediaTailor performs ad prefetching in a live event.
iv_scheduletype TYPE /AWS1/MDTPREFETCHSCHEDULETYPE /AWS1/MDTPREFETCHSCHEDULETYPE¶
The frequency that MediaTailor creates prefetch schedules.
SINGLEindicates that this schedule applies to one ad break.RECURRINGindicates that MediaTailor automatically creates a schedule for each ad avail in a live event.For more information about the prefetch types and when you might use each, see Prefetching ads in Elemental MediaTailor.
iv_streamid TYPE /AWS1/MDT__STRING /AWS1/MDT__STRING¶
An optional stream identifier that MediaTailor uses to prefetch ads for multiple streams that use the same playback configuration. If
StreamIdis specified, MediaTailor returns all of the prefetch schedules with an exact match onStreamId. If not specified, MediaTailor returns all of the prefetch schedules for the playback configuration, regardless ofStreamId.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mdtcreprefetchschdrsp /AWS1/CL_MDTCREPREFETCHSCHDRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createprefetchschedule(
io_consumption = new /aws1/cl_mdtprefetchconsumpt00(
it_availmatchingcriteria = VALUE /aws1/cl_mdtavailmatchingcrit=>tt___listofavailmatchingcrit(
(
new /aws1/cl_mdtavailmatchingcrit(
iv_dynamicvariable = |string|
iv_operator = |string|
)
)
)
iv_endtime = '20150101000000.0000000'
iv_starttime = '20150101000000.0000000'
)
io_recurringprefetchconf = new /aws1/cl_mdtrecurringprefetc00(
io_recurringconsumption = new /aws1/cl_mdtrecurringconsump00(
it_availmatchingcriteria = VALUE /aws1/cl_mdtavailmatchingcrit=>tt___listofavailmatchingcrit(
(
new /aws1/cl_mdtavailmatchingcrit(
iv_dynamicvariable = |string|
iv_operator = |string|
)
)
)
iv_retrievedadexpirseconds = 123
)
io_recurringretrieval = new /aws1/cl_mdtrecurringretrieval(
io_trafficshapingtpsconf = new /aws1/cl_mdttrafshapingtpsconf(
iv_peakconcurrentusers = 123
iv_peaktps = 123
)
io_trafshapingretrievalwin00 = new /aws1/cl_mdttrfshapingretrie00( 123 )
it_dynamicvariables = VALUE /aws1/cl_mdt__mapof__string_w=>tt___mapof__string(
(
VALUE /aws1/cl_mdt__mapof__string_w=>ts___mapof__string_maprow(
key = |string|
value = new /aws1/cl_mdt__mapof__string_w( |string| )
)
)
)
iv_delayafteravailendseconds = 123
iv_trafficshapingtype = |string|
)
iv_endtime = '20150101000000.0000000'
iv_starttime = '20150101000000.0000000'
)
io_retrieval = new /aws1/cl_mdtprefetchretrieval(
io_trafficshapingtpsconf = new /aws1/cl_mdttrafshapingtpsconf(
iv_peakconcurrentusers = 123
iv_peaktps = 123
)
io_trafshapingretrievalwin00 = new /aws1/cl_mdttrfshapingretrie00( 123 )
it_dynamicvariables = VALUE /aws1/cl_mdt__mapof__string_w=>tt___mapof__string(
(
VALUE /aws1/cl_mdt__mapof__string_w=>ts___mapof__string_maprow(
key = |string|
value = new /aws1/cl_mdt__mapof__string_w( |string| )
)
)
)
iv_endtime = '20150101000000.0000000'
iv_starttime = '20150101000000.0000000'
iv_trafficshapingtype = |string|
)
iv_name = |string|
iv_playbackconfigurationname = |string|
iv_scheduletype = |string|
iv_streamid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv___string = lo_result->get_arn( ).
lo_prefetchconsumption = lo_result->get_consumption( ).
IF lo_prefetchconsumption IS NOT INITIAL.
LOOP AT lo_prefetchconsumption->get_availmatchingcriteria( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv___string = lo_row_1->get_dynamicvariable( ).
lv_operator = lo_row_1->get_operator( ).
ENDIF.
ENDLOOP.
lv___timestampunix = lo_prefetchconsumption->get_endtime( ).
lv___timestampunix = lo_prefetchconsumption->get_starttime( ).
ENDIF.
lv___string = lo_result->get_name( ).
lv___string = lo_result->get_playbackconfname( ).
lo_prefetchretrieval = lo_result->get_retrieval( ).
IF lo_prefetchretrieval IS NOT INITIAL.
LOOP AT lo_prefetchretrieval->get_dynamicvariables( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv___timestampunix = lo_prefetchretrieval->get_endtime( ).
lv___timestampunix = lo_prefetchretrieval->get_starttime( ).
lv_trafficshapingtype = lo_prefetchretrieval->get_trafficshapingtype( ).
lo_trafficshapingretrieval = lo_prefetchretrieval->get_trafshapingretrievalwi00( ).
IF lo_trafficshapingretrieval IS NOT INITIAL.
lv___integer = lo_trafficshapingretrieval->get_retrievalwindowdursecs( ).
ENDIF.
lo_trafficshapingtpsconfig = lo_prefetchretrieval->get_trafficshapingtpsconf( ).
IF lo_trafficshapingtpsconfig IS NOT INITIAL.
lv___integer = lo_trafficshapingtpsconfig->get_peaktps( ).
lv___integer = lo_trafficshapingtpsconfig->get_peakconcurrentusers( ).
ENDIF.
ENDIF.
lo_recurringprefetchconfig = lo_result->get_recurringprefetchconf( ).
IF lo_recurringprefetchconfig IS NOT INITIAL.
lv___timestampunix = lo_recurringprefetchconfig->get_starttime( ).
lv___timestampunix = lo_recurringprefetchconfig->get_endtime( ).
lo_recurringconsumption = lo_recurringprefetchconfig->get_recurringconsumption( ).
IF lo_recurringconsumption IS NOT INITIAL.
lv___integer = lo_recurringconsumption->get_retrievedadexpirseconds( ).
LOOP AT lo_recurringconsumption->get_availmatchingcriteria( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv___string = lo_row_1->get_dynamicvariable( ).
lv_operator = lo_row_1->get_operator( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_recurringretrieval = lo_recurringprefetchconfig->get_recurringretrieval( ).
IF lo_recurringretrieval IS NOT INITIAL.
LOOP AT lo_recurringretrieval->get_dynamicvariables( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv___string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv___integer = lo_recurringretrieval->get_delayafteravailendsecs( ).
lv_trafficshapingtype = lo_recurringretrieval->get_trafficshapingtype( ).
lo_trafficshapingretrieval = lo_recurringretrieval->get_trafshapingretrievalwi00( ).
IF lo_trafficshapingretrieval IS NOT INITIAL.
lv___integer = lo_trafficshapingretrieval->get_retrievalwindowdursecs( ).
ENDIF.
lo_trafficshapingtpsconfig = lo_recurringretrieval->get_trafficshapingtpsconf( ).
IF lo_trafficshapingtpsconfig IS NOT INITIAL.
lv___integer = lo_trafficshapingtpsconfig->get_peaktps( ).
lv___integer = lo_trafficshapingtpsconfig->get_peakconcurrentusers( ).
ENDIF.
ENDIF.
ENDIF.
lv_prefetchscheduletype = lo_result->get_scheduletype( ).
lv___string = lo_result->get_streamid( ).
ENDIF.