Class CatalogVersionSyncMaster
- java.lang.Object
-
- de.hybris.platform.catalog.jalo.synchronization.AbstractCatalogVersionSyncMaster
-
- de.hybris.platform.catalog.jalo.synchronization.CatalogVersionSyncMaster
-
public class CatalogVersionSyncMaster extends AbstractCatalogVersionSyncMaster
- Since:
- 3.1-u6
-
-
Constructor Summary
Constructors Constructor Description CatalogVersionSyncMaster(CatalogVersionSyncJob job, CatalogVersionSyncCronJob cronJob)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoReadSchedules(SyncScheduleReader scheduleReader, int lastLine)voiddoSynchronization()protected intdoSyncTurn()voiddump(SyncSchedule record)SyncSchedulefetchNext(CatalogVersionSyncWorker worker)protected intgetCurrentDumpCount()protected intgetCurrentDumpDeadlockCount()intgetCurrentTurn()booleanhasErrors()voidincrementProcessedItemsCount(int weight)booleanisIgnoreErrors()protected voidnotifyError(CatalogVersionSyncWorker worker, SyncSchedule scheduledItem, java.lang.Exception exception)protected booleannotifyFinished(CatalogVersionSyncWorker worker, SyncSchedule schedule)protected voidnotifyWorkerDied(CatalogVersionSyncWorker worker)voidrunExclusiveIfNecessary(SyncSchedule schedule, java.lang.Runnable r)protected voidsetFirstTurnTotal(int firstTurnTotal)protected voidwaitForEmptyQueue()protected voidwaitForWorkersToDie()-
Methods inherited from class de.hybris.platform.catalog.jalo.synchronization.AbstractCatalogVersionSyncMaster
getAllAttributeConfig, getAttributeConfig, getCatalogManager, getCatalogRequiredAttributes, getCatalogVersionAttribute, getCronJob, getJob
-
-
-
-
Constructor Detail
-
CatalogVersionSyncMaster
public CatalogVersionSyncMaster(CatalogVersionSyncJob job, CatalogVersionSyncCronJob cronJob)
-
-
Method Detail
-
isIgnoreErrors
public final boolean isIgnoreErrors()
-
fetchNext
public final SyncSchedule fetchNext(CatalogVersionSyncWorker worker) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
getCurrentDumpCount
protected int getCurrentDumpCount()
-
getCurrentDumpDeadlockCount
protected int getCurrentDumpDeadlockCount()
-
notifyFinished
protected boolean notifyFinished(CatalogVersionSyncWorker worker, SyncSchedule schedule)
-
runExclusiveIfNecessary
public void runExclusiveIfNecessary(SyncSchedule schedule, java.lang.Runnable r)
-
dump
public void dump(SyncSchedule record)
-
waitForWorkersToDie
protected void waitForWorkersToDie()
-
waitForEmptyQueue
protected void waitForEmptyQueue()
-
doSynchronization
public void doSynchronization() throws AbortCronJobException- Throws:
AbortCronJobException
-
doSyncTurn
protected int doSyncTurn() throws AbortCronJobException- Throws:
AbortCronJobException
-
doReadSchedules
protected void doReadSchedules(SyncScheduleReader scheduleReader, int lastLine) throws AbortCronJobException
- Throws:
AbortCronJobException
-
notifyError
protected void notifyError(CatalogVersionSyncWorker worker, SyncSchedule scheduledItem, java.lang.Exception exception)
- Parameters:
scheduledItem- the scheduled item which caused the errorexception- the error- Throws:
java.lang.RuntimeException- for any runtime exception unless ignore mode is choseJaloSystemException- for all non-runtime exception unless ignore mode is chosen
-
notifyWorkerDied
protected void notifyWorkerDied(CatalogVersionSyncWorker worker)
-
hasErrors
public boolean hasErrors()
-
getCurrentTurn
public int getCurrentTurn()
-
setFirstTurnTotal
protected void setFirstTurnTotal(int firstTurnTotal)
-
incrementProcessedItemsCount
public void incrementProcessedItemsCount(int weight)
-
-