Package org.cyclos.impl.search
Class IndexEntitiesBackgroundTask
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractGlobalServerComponent
-
- org.cyclos.impl.utils.tasks.AbstractTask
-
- org.cyclos.impl.utils.tasks.AbstractBackgroundTask
-
- org.cyclos.impl.search.IndexEntitiesBackgroundTask
-
- All Implemented Interfaces:
BackgroundTask
public class IndexEntitiesBackgroundTask extends AbstractBackgroundTask
Index a batch of entities
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.utils.tasks.AbstractTask
errorLogService, invokerHandler, loggingHandler
-
Fields inherited from class org.cyclos.impl.AbstractGlobalServerComponent
rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description IndexEntitiesBackgroundTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longdoExecute(String context)Must be implemented to actually execute the task logic, returning the number of affected recordsstatic Pair<String,List<Long>>fromContext(String context)Parse the context stringStringgetName()Returns the name for this taskprotected StringlogName(String context)static StringtoContext(String indexName, Collection<Long> ids)Encodes the given data in the context-
Methods inherited from class org.cyclos.impl.utils.tasks.AbstractBackgroundTask
execute
-
Methods inherited from class org.cyclos.impl.utils.tasks.AbstractTask
getLogConfiguration, logTaskError, logTaskSuccess, shouldGenerateErrorLog, toString
-
Methods inherited from class org.cyclos.impl.AbstractGlobalServerComponent
getBaseEntityManagerHandler, getEntityManager
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
fromContext
public static Pair<String,List<Long>> fromContext(String context)
Parse the context string
-
toContext
public static String toContext(String indexName, Collection<Long> ids)
Encodes the given data in the context
-
getName
public String getName()
Description copied from interface:BackgroundTaskReturns the name for this task- Specified by:
getNamein interfaceBackgroundTask- Specified by:
getNamein classAbstractTask
-
doExecute
protected long doExecute(String context)
Description copied from class:AbstractBackgroundTaskMust be implemented to actually execute the task logic, returning the number of affected records- Specified by:
doExecutein classAbstractBackgroundTask
-
logName
protected String logName(String context)
- Overrides:
logNamein classAbstractTask
-
-