Class ElasticsearchReindex
java.lang.Object
org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate<SchedTask>
org.apache.syncope.core.provisioning.java.job.ElasticsearchReindex
- All Implemented Interfaces:
SchedTaskJobDelegate
Remove and rebuild all Elasticsearch indexes with information from existing users, groups and any objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AnyObjectDAOprotected co.elastic.clients.elasticsearch.ElasticsearchClientprotected GroupDAOprotected ElasticsearchIndexManagerprotected RealmDAOprotected UserDAOprotected ElasticsearchUtilsFields inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
auditManager, executor, LOG, manageOperationId, notificationManager, publisher, securityProperties, task, taskDAO, taskExecDAO, taskType, taskUtilsFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected co.elastic.clients.elasticsearch._types.mapping.TypeMappingprotected co.elastic.clients.elasticsearch.indices.IndexSettingsprotected co.elastic.clients.elasticsearch._types.mapping.TypeMappingprotected co.elastic.clients.elasticsearch.indices.IndexSettingsprotected StringdoExecute(JobExecutionContext context) The actual execution, delegated to child classes.protected co.elastic.clients.elasticsearch._types.mapping.TypeMappingprotected co.elastic.clients.elasticsearch.indices.IndexSettingsprotected booleanhasToBeRegistered(TaskExec<?> execution) Template method to determine whether this job's task execution has to be persisted or not.protected co.elastic.clients.elasticsearch._types.mapping.TypeMappingprotected co.elastic.clients.elasticsearch.indices.IndexSettingsreindexAnyObjects(JobExecutionContext context) protected StringreindexAudit(JobExecutionContext context) reindexGroups(JobExecutionContext context) reindexRealms(JobExecutionContext context) reindexUsers(JobExecutionContext context) protected co.elastic.clients.elasticsearch._types.mapping.TypeMappingprotected co.elastic.clients.elasticsearch.indices.IndexSettingsMethods inherited from class org.apache.syncope.core.provisioning.java.job.AbstractSchedTaskJobDelegate
end, endExecution, execute, init, initExecution, register, setStatus
-
Field Details
-
client
-
indexManager
-
utils
-
userDAO
-
groupDAO
-
anyObjectDAO
-
realmDAO
-
-
Constructor Details
-
ElasticsearchReindex
public ElasticsearchReindex()
-
-
Method Details
-
userSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings userSettings() -
groupSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings groupSettings() -
anyObjectSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings anyObjectSettings() -
realmSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings realmSettings() -
auditSettings
protected co.elastic.clients.elasticsearch.indices.IndexSettings auditSettings() -
userMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping userMapping() -
groupMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping groupMapping() -
anyObjectMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping anyObjectMapping() -
realmMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping realmMapping() -
auditMapping
protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping auditMapping() -
reindexRealms
- Throws:
IOException
-
reindexUsers
- Throws:
IOException
-
reindexGroups
- Throws:
IOException
-
reindexAnyObjects
- Throws:
IOException
-
reindexAudit
- Throws:
IOException
-
doExecute
Description copied from class:AbstractSchedTaskJobDelegateThe actual execution, delegated to child classes.- Specified by:
doExecutein classAbstractSchedTaskJobDelegate<SchedTask>- Parameters:
context- job execution context, can be used to pass parameters to the job- Returns:
- the task execution status to be set
- Throws:
JobExecutionException- if anything goes wrong
-
hasToBeRegistered
Description copied from class:AbstractSchedTaskJobDelegateTemplate method to determine whether this job's task execution has to be persisted or not.- Overrides:
hasToBeRegisteredin classAbstractSchedTaskJobDelegate<SchedTask>- Parameters:
execution- task execution- Returns:
- whether to persist or not
-