private void restoreFromStore() {
        taskFromStore = taskStore.getTask(taskId);
        auditVersion = Long.parseLong(taskFromStore.get(TASK_AUDIT_VERSION));
        List<InstanceProfile> profileList = instanceStore.getInstances(taskId);
        profileList.forEach((profile) -> {
            InstanceStateEnum state = profile.getState();
            if (state == InstanceStateEnum.DEFAULT) {
                LOGGER.info("instance restoreFromStore addToMem state {} taskId {} instanceId {}", state, taskId,
                        profile.getInstanceId());
                profile.setBoolean(RESTORE_FROM_DB, true);
                addToMemory(profile);
            } else {
                LOGGER.info("instance restoreFromStore ignore state {} taskId {} instanceId {}", state, taskId,
                        profile.getInstanceId());
            }
        });
    }
thread for core thread.

@return runnable profile.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/instance/InstanceManager.java