public class Y2YSyncMasterJobPerformable extends AbstractJobPerformable<Y2YSyncCronJobModel> implements TypeAwareJobPerformable
flexibleSearchService, modelService, sessionService| Constructor and Description |
|---|
Y2YSyncMasterJobPerformable() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createAllTasksInTx(java.lang.String syncExecutionId,
java.util.List<MediasForType> allMedias,
Y2YSyncType syncType,
java.lang.String nodeGroup) |
boolean |
createDefaultJob()
If method returns
true then the initialization will create a default Job item of the given type. |
protected void |
fillParameters(java.util.Map<java.lang.String,java.lang.Object> globalQueryParameters,
CatalogVersionModel catalogVersion) |
protected java.util.Set<StreamConfigurationModel> |
getActiveConfigurations(Y2YStreamConfigurationContainerModel container) |
protected int |
getBatchSize() |
protected ChangeDetectionService |
getChangeDetectionService() |
protected MediaService |
getMediaService() |
java.lang.String |
getType()
Must return an existing subtype of
ServicelayerJobModel as String. |
protected boolean |
isChangesDetected(java.util.List<MediasForType> allMedias) |
protected java.lang.String |
join(Y2YStreamConfigurationModel y2yStreamConfiguration,
java.util.function.Function<Y2YColumnDefinitionModel,java.lang.String> mapper) |
PerformResult |
perform(Y2YSyncCronJobModel cronJob)
The execution body for a
ServicelayerJob. |
void |
setChangeDetectionService(ChangeDetectionService changeDetectionService) |
void |
setMediaService(MediaService mediaService) |
void |
setSyncTaskFactory(SyncTaskFactory syncTaskFactory) |
protected StreamConfiguration |
toStreamConfiguration(java.util.Map<java.lang.String,java.lang.Object> globalQueryParameters,
Y2YStreamConfigurationModel y2YStreamConfigurationModel) |
clearAbortRequestedIfNeeded, isAbortable, isPerformable, setFlexibleSearchService, setModelService, setSessionServicepublic PerformResult perform(Y2YSyncCronJobModel cronJob)
JobPerformableServicelayerJob. Implement here your execution logic. It can be called
synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the
execution has reached end and if it was successful.perform in interface JobPerformable<Y2YSyncCronJobModel>perform in class AbstractJobPerformable<Y2YSyncCronJobModel>cronJob - the related CronJob in whose context the execution will be performed.PerformResult that indicates whether the execution was successfully executed
or not and has finished or not.protected boolean isChangesDetected(java.util.List<MediasForType> allMedias)
protected java.lang.String join(Y2YStreamConfigurationModel y2yStreamConfiguration, java.util.function.Function<Y2YColumnDefinitionModel,java.lang.String> mapper)
protected int getBatchSize()
protected java.util.Set<StreamConfigurationModel> getActiveConfigurations(Y2YStreamConfigurationContainerModel container)
protected void createAllTasksInTx(java.lang.String syncExecutionId,
java.util.List<MediasForType> allMedias,
Y2YSyncType syncType,
java.lang.String nodeGroup)
protected StreamConfiguration toStreamConfiguration(java.util.Map<java.lang.String,java.lang.Object> globalQueryParameters, Y2YStreamConfigurationModel y2YStreamConfigurationModel)
protected void fillParameters(java.util.Map<java.lang.String,java.lang.Object> globalQueryParameters,
CatalogVersionModel catalogVersion)
public void setChangeDetectionService(ChangeDetectionService changeDetectionService)
protected ChangeDetectionService getChangeDetectionService()
public void setMediaService(MediaService mediaService)
protected MediaService getMediaService()
public void setSyncTaskFactory(SyncTaskFactory syncTaskFactory)
public java.lang.String getType()
TypeAwareJobPerformableServicelayerJobModel as String.getType in interface TypeAwareJobPerformablepublic boolean createDefaultJob()
TypeAwareJobPerformabletrue then the initialization will create a default Job item of the given type.
If your specific Job type requires specific parameters you have to return false.createDefaultJob in interface TypeAwareJobPerformableCopyright © 2018 SAP SE. All Rights Reserved.