...
- Resolves them, and if not resolved, then call USDU logic to start the unresolvable process (i.e. they can be unresolvable for X days until removed from Grouper)
- Compares their search and sort strings with whats in the grouper_members table and batch update if there are changes
- If a provisioner is using a subject scriptlet to handle subjects during provisioning, calculates the values and compare to the sync tables and bulk update if there are changes
- Note, we need to get all the changes needed, and block any provisioners from running so we dont step on toes, do the changes, and then unblock
...
Code Block |
---|
GcGrouperSync gcGrouperSync = GcGrouperSyncDao.retrieveOrCreateByProvisionerName(null, <configName>); GcGrouperSyncJob gcGrouperSyncJob = gcGrouperSync().getGcGrouperSyncJobDao().jobRetrieveOrCreateBySyncType("usduSubjectCacheUpdater"); gcGrouperSyncJob.waitForRelatedJobsToFinishThenRun(true); try { // thread to update heartbeat this.setJobState(GcGrouperSyncJobState.running); this.setHeartbeat(new Timestamp(System.currentTimeMillis())); this.grouperSync.getGcGrouperSyncJobDao().internal_jobStore(this); List<GcGrouperSyncMember> gcGrouperSyncMembers = this.gcTableSync.getGcGrouperSync().getGcGrouperSyncMemberDao().memberRetrieveAll(); ...make changes... # this will persist in batch only objects that have changed since being retrieved int objectsStored = gcTableSync.getGcGrouperSync().getGcGrouperSyncDao().storeAllObjects(); } finally { GcGrouperSyncHeartbeat.endAndWaitForThread(this.gcGrouperSyncHeartbeat); gcGrouperSyncJob.assignHeartbeatAndEndJob(); } |
See Also